-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGulpfile.js
34 lines (26 loc) · 838 Bytes
/
Gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var args = require('yargs').argv;
var chai = require('chai');
function printError(error) {
console.error('\nError:', error.plugin);
console.error(error.message);
}
function printEvent(event) {
console.log('File', event.type +':', event.path);
}
gulp.task('test', function() {
assert = chai.assert;
gulp.src(['test/structure/**/*', 'test/process/**/*'])
.pipe(mocha({
reporter: 'spec',
bail: !!args.bail,
}))
.on('error', printError);
});
gulp.task('default', ['dev']);
gulp.task('watch', function() {
gulp.watch(['src/**/*', 'test/**/*', 'node_modules/gremlin-core-js/**/*', '!node_modules/gremlin-core-js/node_modules/**/*', 'index.js'], ['test'])
.on('change', printEvent);
});
gulp.task('dev', ['test', 'watch']);