You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vargulp=require('gulp'),livereload=require('gulp-livereload');gulp.task('reload',function(){gulp.pipe(livereload());});// Watch Files For Changesgulp.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 messagegulp.task('default',['watch']);
result in console(start gulp and then change .js file:
$ gulp
[16:36:58] Using gulpfile d:\development\web\projects\tasks.php\gulpfile.js
[16:36:59] Starting 'watch'...
[16:36:59] Finished 'watch' after 74 ms
[16:36:59] Starting 'default'...
[16:36:59] Finished 'default' after 28 μs
[16:37:02] Starting 'reload'...
[16:37:02] 'reload' errored after 1.66 ms
[16:37:02] 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
What i'm doing wrong?
The text was updated successfully, but these errors were encountered:
vargulp=require('gulp'),livereload=require('gulp-livereload');gulp.task('reload',function(){gulp.src('web/js/*.js').pipe(livereload());});// Watch Files For Changesgulp.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 messagegulp.task('default',['watch']);
I have win7, git bash && chrome.
gulpfile.js:
result in console(start gulp and then change .js file:
What i'm doing wrong?
The text was updated successfully, but these errors were encountered: