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('-p, --port <port>', '初始化git')
|
12 | .parse(process.argv);
|
13 |
|
14 | const launchServer = () => {
|
15 | let port;
|
16 | if (program.port) {
|
17 | port = program.port;
|
18 | }
|
19 | require('../webpack/dev/server.js')(port);
|
20 | }
|
21 |
|
22 | const main = async () => {
|
23 | checkAll(launchServer);
|
24 | }
|
25 |
|
26 | require('../lib/check-version')().then(res => {
|
27 | main();
|
28 | });
|