-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
39 lines (33 loc) · 871 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
"use strict";
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var mocha = require('gulp-mocha');
var appFiles = ['index.js', 'lib/**/*.js', 'bin/**/*.js'];
var testFiles = ['./test/**/*.js'];
gulp.task('jshint:test', function(){
return gulp.src(testFiles)
.pipe(jshint({
node: true,
globals: {
describe: true,
it: true,
before: true,
after: true
}
}))
.pipe(jshint.reporter('default'));
});
gulp.task('jshint:app', function(){
return gulp.src(appFiles)
.pipe(jshint({
})).pipe(jshint.reporter('default'));
});
gulp.task('mocha:test', function(){
return gulp.src(testFiles)
.pipe(mocha({
reporter: 'nyan'
}));
});
gulp.task('jshint', ['jshint:test', 'jshint:app']);
//gulp.task('mocha', ['mocha:test']);
gulp.task('default', ['jshint', 'mocha:test']);