-
Notifications
You must be signed in to change notification settings - Fork 33
/
gulpfile.js
44 lines (36 loc) · 946 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
35
36
37
38
39
40
41
42
43
44
var gulp = require("gulp");
var plumber = require("gulp-plumber");
var mocha = require('gulp-mocha');
var process = require("child_process");
var exec = process.exec;
var bs = require("browser-sync");
var reload = bs.reload;
var src = {
js: ["lib2/**/*.js"],
tests: ['./test/**/*.js', '!test/{temp,temp/**}']
};
var index = "./bin/aigis";
gulp.task("exec:index", function(cb) {
exec("node " + index + " ./examples/aigis_config.yml", function(err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb();
});
});
gulp.task("watch",function() {
return gulp.watch(src.js, ["exec:index"]);
});
gulp.task("serve", function() {
bs.init({
server: {
baseDir: ["./examples"],
directory: true
},
notify: false,
host: "localhost"
});
});
gulp.task('test', function() {
gulp.src('test/**/*.js', {read: false}).pipe(mocha({reporter: 'nyan'}));
});
gulp.task("default", ["exec:index"]);