我在构建过程中使用的是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'的状态如何。
有什么建议吗?