lundi 2 février 2015

Unsure about example given on BrowserSync homepage


Consider this example given on the BrowserSync + Gulp page regarding Browser Reloading, especially this part:



// use default task to launch BrowserSync and watch JS files
gulp.task('default', ['browser-sync'], function () {

// add browserSync.reload to the tasks array to make
// all browsers reload after tasks are complete.
gulp.watch("js/*.js", ['js', browserSync.reload]);
});


As task dependencies are run asynchronously (here: the js and browserSync.reload) couldn't it happen that the reload finishes before the js task?





Aucun commentaire:

Enregistrer un commentaire