I use the supervisor to run the express project and use browserSync to monitor the changes of webpages then auto reload the browser. I am trying to merge the two tasks with gulp and run the tasks in one time. As my gulpfile.js is:
gulp.task('supervisor', function(cb) {
supervisor('./app.js');
cb();
});
gulp.task('another', ['supervisor'], function() {
// The following task that should run after the supervisor
browserSync().init(null, {
proxy: 'http://localhost:3000',
port: 4000
});
// Other tasks ...
});
But it always runs browserSync before supervisor ...
Maybe add event listener or configurations for the synchronous-running tasks ?
Or another method to force the order of the two tasks?
Thank you!!
I use the supervisor to run the express project and use browserSync to monitor the changes of webpages then auto reload the browser. I am trying to merge the two tasks with gulp and run the tasks in one time. As my gulpfile.js is:
But it always runs browserSync before supervisor ...
Maybe add event listener or configurations for the synchronous-running tasks ? Or another method to force the order of the two tasks? Thank you!!