gulp stop/cancel running task -


how can cancel/stop current running task in gulp?

my task:

gulp.task('scripts', function() {   return gulp.src('js/main.js')     .pipe(browserify({         transform: [to5ify]     }))     .pipe(gulp.dest('./dist')); }); 

it runs in watch:

gulp.task('watch', function() {   gulp.watch('js/**/*.js', ['scripts']); }); 

if change js file, task runs, thats nice. if change file while task running, task not stop , restart. how can fix this?

the task runs average of 20s , described case occurs frequently


Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -