gulp.watch only runs once when passed a run-sequence task -


i have gulpfile, uses run sequence , gulp.watch().

here example task uses run sequence.

gulp.task('rebuild', function (callback) {     runsequence('clean',                 'lint',                 ['process-js', 'process-styles', 'move-fonts', 'move-static-content']); }); 

when make change file, watch task run task specified once. in case, task should executed "run", same default task except doesn't run dev server , watch task again. nothing happens when make further edits, whether in same file or different one.

if pass gulp.watch plain gulp task (without run sequence), example clean task, watch run clean task every time.

i'm sure i'm doing wrong, don't understand what. think might silently erroring , disconnecting stream, can't figure out how debug this.

you aren't passing callback run-sequence, therefore task never completes. - overzealous

so run sequence task needs this:

gulp.task('rebuild', function (callback) {     runsequence('clean',                 'lint',                 ['process-js', 'process-styles', 'move-fonts', 'move-static-content'],                 callback); }); 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -