Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var $ = require('gulp-load-plugins')({lazy: true});
var colors = $.util.colors;
var envenv = $.util.env;
var port = process.env.PORT || config.defaultPort;
var syncing = false;

/**
* yargs variables can be passed in to alter the behavior, when present.
Expand Down Expand Up @@ -370,7 +371,16 @@ gulp.task('bump', function() {
/**
* Optimize the code and re-load browserSync
*/
gulp.task('browserSyncReload', ['optimize'], browserSync.reload);
gulp.task('browserSyncReload', function() {
if (syncing) {
return;
}
syncing = true;
gulp.start('optimize', function() {
browserSync.reload();
syncing = false;
});
});

////////////////

Expand Down