Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(watch): Run sync, to prevent errors from race conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Dec 28, 2015
1 parent 78c2be6 commit 19cc4b0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions build/tasks/watch.js
@@ -1,9 +1,18 @@
var gulp = require('gulp');
var gutil = require('gulp-util');
var gulp = require('gulp');
var gutil = require('gulp-util');
var runSequence = require('run-sequence');

gulp.task('watch', ['clean', 'build-commonjs'], function() {
gulp.task('attach-watchers', function () {
return gulp.watch(['src/**/*', 'test/**/*'], ['build']).on('change', function(file) {

gutil.log('File ' + file + ' was changed, running tasks...');
});
});

gulp.task('watch', function(callback) {
return runSequence(
'clean',
'build-commonjs',
'attach-watchers',
callback
);
});

0 comments on commit 19cc4b0

Please sign in to comment.