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