Answer the question
In order to leave comments, you need to log in
Is it possible to specify a priority when executing a task?
There is such a code.
gulp.task('delImages:build', function() {
return delFilesDir.sync([paths.img.pay + '**/*', '!' + paths.svg.svgname + '.svg']);
});
gulp.task('image:build', gulp.series(['delImages:build']), function(done) {
return gulp.src([paths.img.take, '!' + paths.svg.take])
.pipe(cache(imagemin({
interlaced : true,
progressive : true,
svgoPlagins : [{removeViewBox : false}],
use : [pngquant()]
})))
.pipe(gulp.dest(paths.img.pay));
done();
});
gulp.task('image:build', ['delImages:build'], function(done) {
return gulp.src([paths.img.take, '!' + paths.svg.take])
.pipe(cache(imagemin({
interlaced : true,
progressive : true,
svgoPlagins : [{removeViewBox : false}],
use : [pngquant()]
})))
.pipe(gulp.dest(paths.img.pay));
done();
});
gulp.task('delImages:build', function() {
return delFilesDir.sync([paths.img.pay + '**/*', '!' + paths.svg.svgname + '.svg']);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question