1 | #!/usr/bin/env node
|
2 |
|
3 | const path = require('path');
|
4 | const ora = require('ora');
|
5 | const program = require('commander');
|
6 | const inquirer = require('inquirer');
|
7 |
|
8 | const checkAll = require('../lib/check-all');
|
9 |
|
10 | program
|
11 | .option('--zip', '打包后压缩')
|
12 | .option('--to [dist]', '打包后压缩并移动至指定位置(默认为桌面)')
|
13 | .parse(process.argv);
|
14 |
|
15 | const build = async () => {
|
16 | require('../webpack/build/build.js')(program.zip, program.to);
|
17 | }
|
18 |
|
19 | const main = () => {
|
20 | checkAll(build);
|
21 | }
|
22 |
|
23 | require('../lib/check-version')().then(res => {
|
24 | main();
|
25 | });
|