-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
57 lines (45 loc) · 1.41 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
require('coffee-script/register')
require('babel-register')(require('./babel.config'))
const gulp = require('gulp')
const {log} = require('./lib/utils')
const {buildAsync,
installPluginsAsync,
getFlashAsync,
getFlashAllAsync,
cleanFiles,
installThemeAsync,
packWinReleaseAsync} = require('./build_detail')
const package_json = require('./package.json')
let poiVersion = null
gulp.task('getVersion', () => {
const package_version = package_json.version
poiVersion = package_version
log(`*** Start building poi v${poiVersion} ***`)
})
gulp.task ('deploy', ['getVersion', 'get_flash'], async() => {
await installThemeAsync(poiVersion)
})
gulp.task ('build', ['getVersion', 'get_flash_all'], async() => {
await buildAsync(poiVersion)
})
gulp.task('get_flash', ['getVersion'], async() => {
await getFlashAsync(poiVersion)
})
gulp.task('get_flash_all', ['getVersion'], async() => {
await getFlashAllAsync(poiVersion)
})
gulp.task('build_plugins', ['getVersion'], async() => {
await installPluginsAsync(poiVersion)
})
gulp.task('pack_win_release', ['getVersion'], async() => {
await packWinReleaseAsync(poiVersion)
})
gulp.task('clean', async () => {
await cleanFiles()
})
gulp.task('default', () => {
const _gulp = 'gulp'
log("Usage:")
log(` ${_gulp} build - Build release complete packages under ./dist/`)
log(` ${_gulp} build_plugins - Pack up latest plugin tarballs under ./dist/`)
})