gimm / gulp-live-server

serve your nodejs/static app live
148 stars 71 forks source link

notify() forcing to use signature of gulp.watch which excludes tasks execution #31

Closed cybertino closed 9 years ago

cybertino commented 9 years ago

Due to gulp.run() deprecation there are two ways to run gulp tasks: either to use them as dependencies or pass them to gulp.watch() method as a parameter.

But according to documentation notify() is used on gulp.watch() callback replacing an array used for tasks. How are the tasks going to be executed then? Is there any way for it?

cybertino commented 9 years ago

Sorry, seems I was a bit fast with creating of this issue. Here is an answer:

var watcher = gulp.watch('js/**/*.js', ['uglify']);
watcher.on('change', function(event) {
    server.notify(event);
});