且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将 gulp.start 函数迁移到 Gulp v4

更新时间:2022-11-30 11:53:34

把你的任务改成函数后,简单使用;

After changing your tasks to functions, simply use;

gulp.task('default', gulp.series (watch, gulp.parallel(styles, scripts, images),

    function (done) { done(); }    
));

watch 函数将首先运行,然后是样式、脚本和图像函数并行运行.

The watch function will run first, then the styles, scripts and images functions in parallel.

来自 gulp.series 文档:

组合的嵌套深度没有强加限制使用 series() 和 parallel() 进行操作.

There are no imposed limits on the nesting depth of composed operations using series() and parallel().