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']);
|
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'))
|
||||||
});
|
});
|
||||||
|
|
Reference in New Issue