Proper image glob patterns.

This commit is contained in:
VesterDe 2017-03-21 15:02:29 +01:00
parent 5ac4257c00
commit b1990918ff
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']); gulp.watch([basePaths.dev + 'js/**/*.js','js/**/*.js','!js/theme.js','!js/theme.min.js'], ['scripts']);
//Inside the watch task. //Inside the watch task.
gulp.watch('./img', ['imagemin']) gulp.watch('./img/**', ['imagemin'])
}); });
// Run: // Run:
// gulp imagemin // gulp imagemin
// Running image optimizing task // Running image optimizing task
gulp.task('imagemin', function(){ gulp.task('imagemin', function(){
gulp.src('img/*') gulp.src('img/**')
.pipe(imagemin()) .pipe(imagemin())
.pipe(gulp.dest('img')) .pipe(gulp.dest('img'))
}); });