forked from csnover/TraceKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGulpfile.js
More file actions
73 lines (62 loc) · 1.72 KB
/
Gulpfile.js
File metadata and controls
73 lines (62 loc) · 1.72 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* jshint esversion: 6 */
/* jshint node: true */
const gulp = require('gulp');
const Server = require('karma').Server;
const jshint = require('gulp-jshint');
const bump = require('gulp-bump');
const srcCode = ['./tracekit.js'];
/**
* Run test once and exit
*/
gulp.task('test', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done).start();
});
/**
* Watch for file changes and re-run tests on each change
*/
gulp.task('tdd', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js'
}, done).start();
});
/**
* Watch for file changes and re-run tests on each change
*/
gulp.task('tddchrome', function (done) {
new Server({
configFile: __dirname + '/karma.conf.chrome.js'
}, done).start();
});
// We do this over using include/exclude to make everything feel gulp-like!
gulp.task('doc', function (cb) {
let jsdoc = require('gulp-jsdoc3');
let config = require('./jsdoc.conf.json');
gulp.src(['README.md'].concat(srcCode), {
read: false
})
.pipe(jsdoc(config, cb));
});
gulp.task('lint', function () {
return gulp.src(['./tracekit.js', './Gulpfile.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// Update bower, component, npm at once:
gulp.task('bump', function () {
gulp.src(['package.json', 'bower.json', 'appveyor.yml'])
.pipe(bump({
type: 'patch'
}))
.pipe(gulp.dest('./'));
});
// Update bower, component, npm at once:
gulp.task('bump-minor', function () {
gulp.src(['package.json', 'bower.json', 'appveyor.yml'])
.pipe(bump({
type: 'minor'
}))
.pipe(gulp.dest('./'));
});