-
Notifications
You must be signed in to change notification settings - Fork 302
/
cli.js
executable file
·32 lines (27 loc) · 1.09 KB
/
cli.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
#!/usr/bin/env node
import { program } from 'commander';
import nwbuild from './index.js';
program
.option('--mode', 'get, run or build mode')
.option('--version', 'NW.js version')
.option('--flavor', 'NW.js build flavor')
.option('--platform', 'NW.js supported platform')
.option('--arch', 'NW.js supported architecture')
.option('--downloadUrl', 'NW.js download server')
.option('--manifestUrl', 'NW.js version info')
.option('--cacheDir', 'Cache NW.js binaries')
.option('--outDir', 'NW.js build artifacts')
.option('--app', 'Platform specific app metadata. Refer to docs for more info')
.option('--cache', 'Flag to enable/disable caching')
.option('--ffmpeg', 'Flag to enable/disable downloading community ffmpeg')
.option('--glob', 'Flag to enable/disable globbing')
.option('--logLevel', 'Specify log level')
.option('--zip', 'Flag to enable/disable compression')
.option('--managedManifest', 'Managed manifest mode')
.option('--nodeAddon', 'Download NW.js Node headers');
program.parse();
nwbuild({
...program.opts(),
srcDir: program.args.join(' '),
cli: true,
});