Merge pull request #273 from VesterDe/master

Proper image glob patterns for imagemin task.
This commit is contained in:
Holger 2017-03-21 15:13:56 +01:00 committed by GitHub
commit 33af8f6a19
1 changed files with 2 additions and 2 deletions

View File

@ -106,14 +106,14 @@ gulp.task('watch', function () {
gulp.watch([basePaths.dev + 'js/**/*.js','js/**/*.js','!js/theme.js','!js/theme.min.js'], ['scripts']);
//Inside the watch task.
gulp.watch('./img', ['imagemin'])
gulp.watch('./img/**', ['imagemin'])
});
// Run:
// gulp imagemin
// Running image optimizing task
gulp.task('imagemin', function(){
gulp.src('img/*')
gulp.src('img/**')
.pipe(imagemin())
.pipe(gulp.dest('img'))
});