-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgulpfile.js
More file actions
39 lines (33 loc) · 772 Bytes
/
gulpfile.js
File metadata and controls
39 lines (33 loc) · 772 Bytes
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
'use strict';
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var mocha = require('gulp-mocha');
var paths = {
scripts: [
__dirname + '/server.js',
__dirname + '/gulpfile.js',
__dirname + '/lib/**/*.js',
__dirname + '/model/**/*.js',
__dirname + '/routes/**/*.js'
],
test: [
__dirname + '/test/**/*test.js'
]
};
gulp.task('lint:test', () => {
return gulp.src(paths.test)
.pipe(eslint())
.pipe(eslint.format());
});
gulp.task('lint:nontest', () => {
return gulp.src(paths.scripts)
.pipe(eslint())
.pipe(eslint.format());
});
gulp.task('mocha', () => {
return gulp.src(paths.test)
.pipe(mocha());
});
gulp.task('default', ['lint:test', 'lint:nontest', 'mocha'], () => {
process.exit(0);
});