-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.js
33 lines (27 loc) · 882 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
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var coveralls = require('gulp-coveralls');
gulp.task('pre-test', function () {
return gulp.src(['lib/**/*.js', '!lib/micro-whalla.js', '!lib/helpers.js'])
.pipe(istanbul({ includeUntested: true }))
.pipe(istanbul.hookRequire());
});
gulp.task('test', ['lint', 'pre-test'], function () {
return gulp.src('test/*.test.js')
.pipe(mocha())
.pipe(istanbul.writeReports());
});
gulp.task('lint', function () {
return gulp.src(['**/*.js', '!node_modules/**', '!coverage/**'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('coveralls', function () {
return gulp.src('coverage/**/lcov.info')
.pipe(coveralls());
});
gulp.task('default', ['test'], function () {
});