Answer the question
In order to leave comments, you need to log in
When adding svg files to a folder, the task does not start, how to fix it?
Good afternoon.
I rummaged everything, but it didn’t work as it should .....
there is a task
// compress svg
gulp.task('svg_compress', function () {
gulp.src('app/img/icon_svg/*.svg')
.pipe(imagemin({
progressive: true,
svgoPlugins: [{removeViewBox: false}],
use: [pngquant()],
interlaced: true
}))
.pipe(gulp.dest('app/img/icon_svg/'));
});
// revizor
gulp.task('watch', ['browser-sync'], function () {
gulp.watch('app/img/icon_svg/**/*.svg', ['svg_compress']);
});
Answer the question
In order to leave comments, you need to log in
gulp.watch does not know how to keep track of added or removed files. Use gulp-watch
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question