Add gulp watch for test running
This commit is contained in:
parent
9db547253d
commit
b33a2ff274
@ -5,6 +5,8 @@ var excludeGitignore = require('gulp-exclude-gitignore');
|
|||||||
var mocha = require('gulp-mocha');
|
var mocha = require('gulp-mocha');
|
||||||
var nsp = require('gulp-nsp');
|
var nsp = require('gulp-nsp');
|
||||||
var babel = require('gulp-babel');
|
var babel = require('gulp-babel');
|
||||||
|
var watch = require('gulp-watch');
|
||||||
|
var batch = require('gulp-batch');
|
||||||
|
|
||||||
// Initialize the babel transpiler so ES2015 files gets compiled
|
// Initialize the babel transpiler so ES2015 files gets compiled
|
||||||
// when they're loaded
|
// when they're loaded
|
||||||
@ -33,5 +35,11 @@ gulp.task('babel', function () {
|
|||||||
.pipe(gulp.dest('dist'));
|
.pipe(gulp.dest('dist'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('watch', function () {
|
||||||
|
watch(['lib/**/*.js', 'test/**/*.js'], batch(function (events, done) {
|
||||||
|
gulp.start('test', done);
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('prepublish', ['nsp', 'babel']);
|
gulp.task('prepublish', ['nsp', 'babel']);
|
||||||
gulp.task('default', ['static', 'test']);
|
gulp.task('default', ['static', 'test']);
|
||||||
|
@ -35,10 +35,12 @@
|
|||||||
"eslint-config-airbnb": "0.0.7",
|
"eslint-config-airbnb": "0.0.7",
|
||||||
"gulp": "^3.6.0",
|
"gulp": "^3.6.0",
|
||||||
"gulp-babel": "^5.1.0",
|
"gulp-babel": "^5.1.0",
|
||||||
|
"gulp-batch": "^1.0.5",
|
||||||
"gulp-eslint": "^0.15.0",
|
"gulp-eslint": "^0.15.0",
|
||||||
"gulp-exclude-gitignore": "^1.0.0",
|
"gulp-exclude-gitignore": "^1.0.0",
|
||||||
"gulp-mocha": "^2.0.0",
|
"gulp-mocha": "^2.0.0",
|
||||||
"gulp-nsp": "^0.4.5",
|
"gulp-nsp": "^0.4.5",
|
||||||
|
"gulp-watch": "^4.3.4",
|
||||||
"lodash": "^3.0.0"
|
"lodash": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user