Skip to content

Commit

Permalink
Fixes google#579, Duplicate of google#636 in master, allows filtering…
Browse files Browse the repository at this point in the history
… gulp.src base directories for image glob

Take a gander at google#636 for a few more details. This fix might work in a lot of branches, frankly, but the material-sprint branch is where I first ran into issues.  Hopefully it helps!  (And this fixes google#579.)
  • Loading branch information
pavgup committed Feb 22, 2015
1 parent 6bd31a0 commit df469e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ gulp.task('jshint', function() {
.pipe($.if(!browserSync.active, $.jshint.reporter('fail')));
});

// Optimize Images
gulp.task('images', function() {
// Optimize Images Recursively (All Files)
gulp.task('images', function () {
return gulp.src('app/images/**/*')
.pipe($.cache($.imagemin({
.pipe($.if($.if.isFile,$.cache($.imagemin({
progressive: true,
interlaced: true
})))
}))
.on('error', function(err){ console.log(err); this.end; })))
.pipe(gulp.dest('dist/images'))
.pipe($.size({title: 'images'}));
});
Expand Down

0 comments on commit df469e8

Please sign in to comment.