-
Notifications
You must be signed in to change notification settings - Fork 974
/
gulpfile.js
52 lines (48 loc) · 1.47 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
'use strict';
const gulp = require('gulp');
const $ = require('./build-system/util');
const requireDir = require('require-dir');
requireDir('./build-system');
gulp.task('help', cb => {
$.util.log(
`
Usage
gulp [TASK] [OPTIONS...]
Available tasks
build Builds the app.
build:app-css Builds the app style.
build:app-js Builds the app scripts.
build:extra Builds extra files.
build:images Builds the app style.
build:lib-css Builds the lib style.
build:lib-js Builds the lib scripts.
clean Cleans files.
clean:dist Cleans dist files.
default
dist Dist the app.
dist:all Copy all to dist.
dist:css Compress css to dist.
dist:html Compress html to dist.
dist:images Compress images to dist.
dist:js Compress js to dist.
help Display this help text.
lint Lint JS files.
server Starts a HTTP(s) server for debug.
watch Watches for changes in files.
`
);
cb();
});
// Run tasks: lint, build, docs, watch, server
gulp.task('default', cb => {
$.util.log(
$.util.colors.green('Building and watching for changes ...')
);
gulp.series(
'lint',
'build:extra', 'build:images', 'build:app-css', 'build:lib-js', 'build:lib-css', 'watch', 'server', () => {
$.util.log(
$.util.colors.green('Ready! Run "gulp help" for more build command usages.'), '\n'
);
})(cb);
});