[英]use gulp+browserify+reactify, can't emit exit when got a ReactifyError
下面是一個gulp任務代碼,我希望gulp在出現錯誤時保持運行。
gulp.task('tmp-script', function() {
glob('./app/pages/*.js', {}, function(err, files) {
files.forEach(function(file) {
browserify(file, {
transform: [reactify]
})
.bundle()
.on('error', function(err){
console.log(err.message);
this.emit('end');
})
.pipe(source(file.replace('./app/pages/', '')))
.pipe(gulp.dest('.tmp/js'));
});
});
});
我能做什么?
我的錯,這是一個不好的問題,我沒有在gulp(watch)任務中添加.on(error)函數...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.