1. 怎么避免gulp watch 中断?
使用gulp-blumber插件:
npm install gulp-plumber --save
在配置文件中类似这样使用:
gulp.task('coffee', function() {
return gulp.src(path.scripts)
.pipe(plumber()) //plumber给pipe打补丁
.pipe(coffee())
.pipe(gulp.dest('js'));
});
。。。。。未完待续