gulpfile.js:
var gulp = require('gulp'),
livereload = require('gulp-livereload');
gulp.task('reload', function() {
gulp.pipe(livereload());
});
// Watch Files For Changes
gulp.task('watch', function() {
livereload.listen();
gulp.watch('web/js/*.js', ['reload']);
gulp.watch('web/css/*.css', ['reload']);
});
// create a default task and just log a message
gulp.task('default', ['watch']);
Расширение для chrome поставил. В консоли(cygwin, сижу под win7) пишу gulp, вывод:
$ gulp
[19:26:42] Using gulpfile d:\development\web\projects\tasks.php\gulpfile.js
[19:26:42] Starting 'watch'...
[19:26:42] Finished 'watch' after 82 ms
[19:26:42] Starting 'default'...
[19:26:42] Finished 'default' after 22 μs
[19:26:46] Starting 'reload'...
[19:26:46] index.html reloaded.
[19:26:46] 'reload' errored after 5.68 ms
[19:26:46] TypeError: undefined is not a function
at Gulp.<anonymous> (d:\development\web\projects\tasks.php\gulpfile.js:6:10)
at module.exports (C:\Users\Фёдор\AppData\Roaming\npm\node_modules\gulp\node
_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (C:\Users\Фёдор\AppData\Roaming\npm\node_modul
es\gulp\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (C:\Users\Фёдор\AppData\Roaming\npm\node_modul
es\gulp\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (C:\Users\Фёдор\AppData\Roaming\npm\node_modules\
gulp\node_modules\orchestrator\index.js:134:8)
at Gulp.<anonymous> (C:\Users\Фёдор\AppData\Roaming\npm\node_modules\gulp\in
dex.js:36:18)
at Gaze.<anonymous> (C:\Users\Фёдор\AppData\Roaming\npm\node_modules\gulp\no
de_modules\vinyl-fs\node_modules\glob-watcher\index.js:18:14)
at Gaze.emit (events.js:110:17)
at Gaze.emit (C:\Users\Фёдор\AppData\Roaming\npm\node_modules\gulp\node_modu
les\vinyl-fs\node_modules\glob-watcher\node_modules\gaze\lib\gaze.js:129:32)
at C:\Users\Фёдор\AppData\Roaming\npm\node_modules\gulp\node_modules\vinyl-f
s\node_modules\glob-watcher\node_modules\gaze\lib\gaze.js:415:16
В чем может быть проблема?