我的默认gulp任务是如下所示的gulp.series。 browserLoadingWatching
是否应该仅在所有先前的任务完成之后才运行?
在完成imagemin(buildImages)之前和复制所有我的php include文件(buildMarkup)之前,我的浏览器正在加载。
因此,页面加载,然后15秒钟后控制台显示imagemin completed 78 filess minified
。
我是gulp 4的新手,只是一个中级js。我可以发布整个gulp文件,但是它很大。
gulp.series(
Object.assign(copyVendorJS(), { displayName: `Booting Copy VendorJS Task: Copy` }),
Object.assign(cleanMarkup(mode), { displayName: `Booting Markup Task: Clean - ${modeName}` }),
Object.assign(buildMarkup(mode), { displayName: `Booting Markup Task: Build - ${modeName}` }),
Object.assign(cleanImages(mode), { displayName: `Booting Images Task: Clean - ${modeName}` }),
Object.assign(buildImages(mode), { displayName: `Booting Images Task: Build - ${modeName}` }),
Object.assign(cleanStyles(mode), { displayName: `Booting Styles Task: Clean - ${modeName}` }),
Object.assign(buildStyles(mode), { displayName: `Booting Styles Task: Build - ${modeName}` }),
Object.assign(cleanScripts(mode), { displayName: `Booting Scripts Task: Clean - ${modeName}` }),
Object.assign(buildScripts(mode), { displayName: `Booting Scripts Task: Build - ${modeName}` }),
Object.assign(browserLoadingWatching, { displayName: `Loading & Watching - ${modeName}` }),
)