-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
55 lines (45 loc) · 1.21 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
var _ = require('lodash');
var args = require('yargs').argv;
var config = require('./gulp.config')();
gulp.task('default', ['help']);
gulp.task('help', plugins.taskListing);
gulp.task('jscs', function () {
return gulp
.src(config.alljs)
.pipe(plugins.jscs());
});
gulp.task('lint', function () {
return gulp
.src(config.alljs)
.pipe(plugins.plumber())
.pipe(plugins.jshint())
.pipe(plugins.jshint.reporter('jshint-stylish', {
verbose: true
}));
});
gulp.task('build', ['lint', 'jscs'], function () {
return gulp
.src(config.alljs)
.pipe(plugins.plumber())
.pipe(plugins.jscs())
.pipe(plugins.jshint())
.pipe(plugins.jshint.reporter('jshint-stylish', {
verbose: true
}));
});
gulp.task('bump', function () {
var type = args.type;
var version = args.version;
var options = {};
if (version) {
options.version = version;
} else {
options.type = type;
}
return gulp
.src(config.packages)
.pipe(plugins.bump(options))
.pipe(gulp.dest(config.root));
});