且构网

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

将gulp.start函数迁移到Gulp v4

更新时间:2022-11-30 12:11:27

将任务更改为函数后,只需使用即可;

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().