-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgulpfile.js
33 lines (29 loc) · 1008 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
/**
* Created by adamgavish on 1/26/15.
*/
var gulp = require('gulp')
, mocha = require('gulp-mocha')
, bump = require('gulp-bump')
, git = require('gulp-git')
, tag_version = require('gulp-tag-version')
, istanbul = require('gulp-istanbul');
gulp.task('test', function (cb) {
gulp.src('./lib/node-embedded-mongodb.js')
.pipe(istanbul()) // Covering files
.pipe(istanbul.hookRequire()) // Force `require` to return covered files
.on('finish', function () {
gulp.src('./test/node-embedded-mongodb_test.js')
.pipe(mocha({
reporter: 'spec',
}))
.pipe(istanbul.writeReports()) // Creating the reports after tests runned
.on('end', cb);
});
});
gulp.task("bump", function () {
gulp.src('./package.json')
.pipe(bump({type: 'patch' }))
.pipe(gulp.dest('./'))
.pipe(git.commit('bumps package version'));
});
gulp.task("default");