gulp 报错'wacth' errord
gulp.wacth(...).watch is not a function
如图:

检查了gulpfile.js文件中的wacth事件:发现这样的写法出错:
gulp.task('watch', function() {
return gulp.watch('./src/app/**/*.js', ['reload']).watch('./src/css/*.sass');
});
最后改为:
gulp.task('watch', function() {
return gulp.watch('./src/app/**/*.js', ['reload']),
gulp.watch('./src/css/*.sass'),
gulp.watch('./src/app/**/*.html',['reload']);
});
因为也想监听html的变动,所以在后面加了
gulp.watch('./src/app/**/*.html',['reload']);
只有在泥泞的道路上才能留下脚印

浙公网安备 33010602011771号