-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
27 lines (21 loc) · 610 Bytes
/
gulpfile.js
File metadata and controls
27 lines (21 loc) · 610 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
'use strict';
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var lint = ['index.js', 'utils.js', 'test.js'];
gulp.task('coverage', function() {
return gulp.src('index.js')
.pipe(istanbul())
.pipe(istanbul.hookRequire());
});
gulp.task('mocha', ['coverage'], function() {
return gulp.src('test.js')
.pipe(mocha({reporter: 'spec'}))
.pipe(istanbul.writeReports())
});
gulp.task('eslint', function() {
return gulp.src(lint)
.pipe(eslint())
});
gulp.task('default', ['mocha', 'eslint']);