I defined in a gulp file, the following task:
gulp.task('watch:livereload', function(){
livereload.listen();
gulp.watch('app/**').on('change', livereload.changed);
});
Which only recently did I realize is great only for static things like html. Because I use sass and the app is primarily js. I would like to call some tasks I have predefined to recompile the js and css upon any change to them.
The way I have been calling tasks is by:
gulp.task('compile:development',
[
'bower',
'compile:scripts:development',
'compile:sass:development',
'serve',
'watch:livereload'
]
);
But I want the tasks to happen on change. Ideas?