-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gulpfile.js
70 lines (62 loc) · 2.17 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
var bump = require('./tasks/bump.js');
var bundle = require('./tasks/bundle.js');
var changelog = require('./tasks/changelog.js');
var checkout = require('./tasks/checkout.js');
var checkoutTag = require('./tasks/checkout_tag.js');
var clean = require('./tasks/clean.js');
var commit = require('./tasks/commit.js');
var gulp = require('gulp');
var jshint = require('./tasks/jshint.js');
var publishWebstore = require('./tasks/publish_webstore.js');
var push = require('./tasks/push.js');
var runSequence = require('run-sequence').use(gulp);
var tag = require('./tasks/tag.js');
var tasksConfig = require('./tasks.config.js');
var template = require('./tasks/template.js');
var unitTest = require('./tasks/unit_test.js');
var zip = require('./tasks/zip.js');
gulp.task('bump', bump);
gulp.task('bundle', bundle);
gulp.task('changelog', changelog);
gulp.task('checkout', checkout);
gulp.task('checkout-tag', checkoutTag);
gulp.task('clean', clean);
gulp.task('commit', commit);
gulp.task('lint', jshint);
gulp.task('publish-webstore', publishWebstore);
gulp.task('push', push);
gulp.task('tag', tag);
gulp.task('template', template);
gulp.task('unit-test', unitTest);
gulp.task('zip', zip);
gulp.task('test', function (callback) {
runSequence('lint', 'unit-test', callback);
});
gulp.task('build', function (callback) {
runSequence('clean', 'template', 'bundle', callback);
});
gulp.task('package', function (callback) {
runSequence('build', 'zip', callback);
});
gulp.task('release-ci', function (callback) {
runSequence('bump', 'package', 'changelog', 'checkout', 'commit', 'tag', 'push', callback);
});
gulp.task('release', function (callback) {
runSequence('bump', 'package', 'changelog', 'commit', 'tag', callback);
});
gulp.task('publish-ci', function (callback) {
if (tasksConfig.browser == 'chrome') {
runSequence('checkout-tag', 'package', 'publish-webstore', callback);
}
else {
runSequence('checkout-tag', 'package', callback);
}
});
gulp.task('publish', function (callback) {
if (tasksConfig.browser == 'chrome') {
runSequence('package', 'publish-webstore', callback);
}
else {
runSequence('package', callback);
}
});