-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathgulpfile.js
More file actions
32 lines (27 loc) · 757 Bytes
/
gulpfile.js
File metadata and controls
32 lines (27 loc) · 757 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
var path = require('path');
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var excludeGitignore = require('gulp-exclude-gitignore');
var plumber = require('gulp-plumber');
var jshint = require('gulp-jshint');
gulp.task('static', function () {
return gulp.src('**/*.js')
.pipe(excludeGitignore())
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
gulp.task('test', function (cb) {
var mochaErr;
gulp.src('test/**/*.js')
.pipe(plumber())
.pipe(mocha({reporter: 'spec'}))
.on('error', function (err) {
mochaErr = err;
})
.on('end', function () {
cb(mochaErr);
});
});
gulp.task('publish', function(){});
gulp.task('default', ['static', 'test']);