这是我的 Gulpfile:
var gulp = require('gulp'),
watch = require('gulp-watch'),
livereload = require('gulp-livereload');
gulp.task('watch', function() {
livereload.listen();
gulp.watch('./css/**/*.css', ['css']).on('change', livereload.changed);
gulp.watch('./js/**/*.js', ['js']).on('change', livereload.changed);
gulp.watch('./**/*.php').on('change', livereload.changed);
});
gulp.task('default', [ 'watch']);
它将重新加载 CSS 一次,然后崩溃并出现以下错误:
[15:30:13] style.css was reloaded.
[15:30:13] Task 'css' is not in your gulpfile
[15:30:13] Please check the documentation for proper gulpfile formatting
不知道该怎么做,有人遇到过类似的问题吗?