Proper image glob patterns.
This commit is contained in:
parent
5ac4257c00
commit
b1990918ff
|
@ -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'))
|
||||
});
|
||||
|
|
Reference in New Issue