如果任务失败,则停止整个Gulp系列

时间:2019-05-24 19:25:33

标签: typescript gulp

我在构建过程中使用的是Gulp 4。

简而言之,我有以下gulp脚本

const typescriptCompile = () => 
    tsProject.src().pipe(tsProject()).js.pipe(gulp.dest("lib"));

exports.default = gulp.series(deleteLibDir, typescriptCompile, typescriptLint, bundler);

问题在于,当typescriptCompile失败时,整个过程不会失败-这样捆绑程序将生成一个空捆绑并最终发出“成功”状态。

我尝试使用gulp-fail,但是series将继续使用,无论'typescriptCompile'的状态如何。

有什么建议吗?

0 个答案:

没有答案