forked from arcfina/openfin-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.js
executable file
·35 lines (32 loc) · 1.13 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
33
34
35
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const openfinCli = require('./');
const options = {
flags: {
name: { alias: 'n', type: 'string' },
url: { alias: 'u', type: 'string' },
config: { alias: 'c', type: 'string' },
launch: { alias: 'l', type: 'boolean' },
devtoolsPort: { alias: 'p', type: 'integer' },
runtime: { alias: 'r', type: 'string' },
platform: { alias: 't', type: 'boolean' },
save: { alias: 's', type: 'string' }
}
};
const cli = meow({
help: [
'OpenFin cli is capable of launching Application, and creating OpenFin config files.',
'Options:',
'-c --config <path to config file>',
'-u --url <application url>',
'-l --launch launch this configuration',
'-p --devtools-port devtools port number',
'-r --runtime-version runtime version',
'-s --save the manifest to the current directory <manifest name>',
'--version current version of the tool',
'Example',
' openfin -l -c myconfig.json -u http://www.openfin.co'
].join('\n')
});
openfinCli(cli);