-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
verbfile.js
50 lines (43 loc) · 1.19 KB
/
verbfile.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
40
41
42
43
44
45
46
47
48
49
50
'use strict';
var gutil = require('gulp-util');
var istanbul = require('gulp-istanbul');
var jshint = require('gulp-jshint');
var mocha = require('gulp-mocha');
var through = require('through2');
var verb = require('./');
verb.disable('debugEngine');
verb.disable('reflinks');
verb.task('readme', function () {
verb.src('.verb.md')
.pipe(verb.dest('.'))
});
verb.task('docs', function () {
verb.src('docs/_templates/[e-g]*.md')
.pipe(verb.dest('test/actual'))
});
verb.task('lint', function () {
/* deps: jshint-stylish */
verb.src(['index.js', 'lib/**/*.js'])
.on('error', gutil.log)
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'));
});
verb.task('test', ['lint'], function (cb) {
verb.src(['index.js', 'lib/**/*.js'])
.on('error', gutil.log)
.pipe(istanbul())
.pipe(istanbul.hookRequire())
.on('finish', function () {
verb.src('test/*.js')
.pipe(mocha())
.pipe(istanbul.writeReports({
reporters: [ 'text' ],
reportOpts: {dir: 'coverage', file: 'summary.txt'}
}))
.on('end', function () {
verb.diff();
cb();
});
});
});
verb.task('default', ['readme']);