The signature for gulp-watch is
watch(glob, [options, callback])
However, it seems like you can either have a callback or options but not both. What I am trying to do is:
gulp.watch('*.js',['someTask','anotherTask'],function(event){...});
It executes the dependent tasks 'someTask' and 'anotherTask' but does not execute the callback. You can have a callback:
gulp.watch('*.js',function(event){...});
Or you can execute dependencies:
gulp.watch('*.js',['someTask','anotherTask']);
But I cannot get it to execute dependent tasks and give me a callback.
Try this:
gulp.watch('*.js',function(event){gulp.run('someTask','anotherTask')});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With