-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgulpfile.js
34 lines (30 loc) · 917 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 karma = require('gulp-karma'),
gulp = require('gulp'),
nodemon = require('gulp-nodemon'),
path = require('path'),
protractor = require('gulp-protractor').protractor,
source = require('vinyl-source-stream'),
stringify = require('stringify'),
watchify = require('watchify'),
mocha = require('gulp-mocha'),
exit = require('gulp-exit');
var paths = {
clientTests: [],
serverTests: ['test/server/**/*.js']
};
gulp.task('nodemon', function () {
nodemon({ script: 'index.js', ext: 'js', ignore: ['node_modules/**'] })
.on('restart', function () {
console.log('>> node restart');
});
});
gulp.task('test:server', ['test:client'], function() {
return gulp.src(paths.serverTests)
.pipe(mocha({
reporter: 'spec',
timeout: 50000
}))
.pipe(exit());
});
gulp.task('production', ['nodemon']);
gulp.task('default', ['nodemon']);