-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
38 lines (32 loc) · 874 Bytes
/
gulpfile.js
File metadata and controls
38 lines (32 loc) · 874 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
27
28
29
30
31
32
33
34
35
36
37
38
'use strict';
var gulp = require('gulp');
var args = require('yargs').argv;
var bump = require('gulp-bump');
var mocha = require('gulp-mocha');
/**
* Execute all tests.
*/
gulp.task('run-tests', function () {
return gulp.src('test/**/*.js', { read: false })
.pipe(mocha({ reporter: 'spec' }));
});
gulp.task('default', function () {
gulp.watch('**/*.js', ['run-tests'])
});
gulp.task('bump-webapiproxy', function () {
var type = args.type;
var version = args.version;
var options = {};
var msg = '';
if (version) {
options.version = version;
msg += ' to ' + version;
} else {
options.type = type;
msg += ' for a ' + type;
}
return gulp
.src('./src/tasks/gulp-webapiproxy/package.json')
.pipe(bump(options))
.pipe(gulp.dest('./src/tasks/gulp-webapiproxy'));
});