-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
33 lines (27 loc) · 846 Bytes
/
index.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
#!/usr/bin/env node
import wizard from './wizard.js';
import buildMap from './buildMap.js';
import showTitle from './title.js';
import { Command } from 'commander';
const program = new Command();
program
.name('falconeye-wizrad')
.description('CLI to to configure your project to upload map file')
.version('1.1.0');
program
.command('wizard')
.description('a wizard to help to configure all things step by step')
.action(async () => {
await showTitle('FalconEye');
await wizard();
});
program
.command('build')
.description('Build bundle source map files for the js file')
.argument('<string>', 'file path you want to build')
.option('-o, --outpath <string>', 'output file path', './bundle.js')
.action(async (file, option) => {
await buildMap(file, option.outpath);
});
// ascii art
program.parse();