Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit fe67c30

Browse files
committed
Merge branch 'master' into develop
* master: Wire up correct imagemin config object Adding Gulp plugins note
2 parents 44b2c76 + a40b9fe commit fe67c30

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

gulpfile.js/tasks/images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ gulp.task('images', function() {
1515
// Optimize images in the `dist` folder (slow)
1616
gulp.task('images-dist', ['utils-dist'], function() {
1717
return gulp.src(config.dist.src)
18-
.pipe(plugins.imagemin(config.imagemin))
18+
.pipe(plugins.imagemin(config.dist.imagemin))
1919
.pipe(gulp.dest(config.dist.dest));
2020
});

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ Configuration is handled by a single file: `gulpconfig.js`. If you leave the dir
8282
* [BrowserSync](http://www.browsersync.io/) settings: if you are developing on a local web server you will want to enter the URL into `browsersync.proxy` and then change `watch.watcher` to `browsersync` to take it for a test drive. You'll know it's working when you run `gulp` and a new browser opens with a live copy of your web site. Make changes to any of the Sass files and they should be shown on the page almost immediately. Of course, BrowserSync really shines when you connect a mobile device to your development server, but for that you're on your own ;)
8383
* Script settings: draw your attention to `scripts.bundles` and `scripts.chunks`. This feature is essentially a poor man's [Browserify](http://browserify.org/) or [Webpack](https://webpack.github.io/). By defining different "chunks" (script files that combine to provide a particular feature) and "bundles" (chunks that combine to provide feature sets) you can generate an assortment of files that can be efficiently and intelligently loaded through your WordPress theme. This approach has its limitations, of course, particularly when dependencies are shared between scripts, but it should be of use to many WordPress theme developers.
8484

85+
Interested in adding new Gulp plugins to your build system? A full tutorial is out of scope for this project but it really shouldn't be all that hard to figure out. In brief, install a plugin with `npm install [package] --save-dev`, require it in a suitable task file, add something to the configuration file if needed, and drop it into the pipeline somewhere. Some types of plugin are particularly easy to add, for instance anything listed on the [postcss.parts](http://postcss.parts/) web site (install, require, and add to the `processor` variable in `./gulpfile.js/tasks/styles.js`).
86+
8587

8688

8789
## WORKING WITH NPM

0 commit comments

Comments
 (0)