我怎么能做这个
// ...
gulp.watch(source.app, gulp.series(
lint(source.app),
transpile(source.app),
ATDD,
));
即使 linter 或 transpiler 发生错误,也要继续观察?
我的任务功能如下所示:
// ...
function lintWorker(source) {
return gulp.src(source)
.pipe(tslint({
configuration: "tslint.json",
options : {
formatter: "prose"
}
}))
.pipe(tslint.report(stylish, {
emitError: false,
sort: true,
bell: true
}));
};
export function lint(source) {
let fn = () => {
return lintWorker(source);
};
fn.displayName = ["linting", ...source].join(" ");
return fn;
};