forked from aquifer/aquifer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
77 lines (69 loc) · 1.54 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @file
* Gulp tasks for this project.
*/
/* globals require */
'use strict';
var gulp = require('gulp'),
eslint = require('gulp-eslint'),
jscs = require('gulp-jscs'),
bump = require('gulp-bump'),
jsFilePatterns = [
'index.js',
'lib/*.js',
'lib/**/*.js'
];
/**
* @task lint
* Runs JSCS and JSLint on module, theme, and gulp files. Excludes all
* minified JavaScript files.
*/
gulp.task('lint', function () {
return gulp.src(jsFilePatterns)
.pipe(eslint())
.pipe(eslint.format())
.pipe(jscs());
});
/**
* @task watch
* Runs lint tasks when files are changed.
*/
gulp.task('watch', function () {
gulp.watch(jsFilePatterns, ['lint']);
});
/**
* @task bump-prerelease
* Increment Aquifer's prerelease version by 1.
*/
gulp.task('bump-prerelease', function () {
gulp.src('./package.json')
.pipe(bump({type: 'prerelease'}))
.pipe(gulp.dest('./'));
});
/**
* @task bump-patch
* Increment Aquifer's patch version by 1.
*/
gulp.task('bump-patch', function () {
gulp.src('./package.json')
.pipe(bump({type: 'patch'}))
.pipe(gulp.dest('./'));
});
/**
* @task bump-minor
* Increment Aquifer's minor version by 1.
*/
gulp.task('bump-minor', function () {
gulp.src('./package.json')
.pipe(bump({type: 'minor'}))
.pipe(gulp.dest('./'));
});
/**
* @task bump-major
* Increment Aquifer's major version by 1.
*/
gulp.task('bump-major', function () {
gulp.src('./package.json')
.pipe(bump({type: 'major'}))
.pipe(gulp.dest('./'));
});