Answer the question
In order to leave comments, you need to log in
Why did Gulp suddenly start copying files along with paths, and how to deal with it?
There is such a task:
gulp.task('img-tin', function () {
return gulp.src('src/img/**/**/*.*')
.pipe(watch('src/img/**/**/*.*'))
.pipe(newer('app/img'))
.pipe(tinpng('rF_1rxxx4wE_ejmzxxxsqXZkxxxdEbW'))
.pipe(gulp.dest('app/img'));
});
Answer the question
In order to leave comments, you need to log in
Вопрос решён. Проблема была в изменившемся запуске gulp-watch.
gulp.task('img-tin', function () {
return watch('src/img/**/**/*.*', function () {
gulp.src('src/img/**/**/*.*')
.pipe(plumber())
.pipe(newer('app/img'))
.pipe(tinpng('KuffE3fffJSVgF4mnffWpfff26xXfffA_l'))
.pipe(gulp.dest('app/img'));
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question