-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.js
48 lines (44 loc) · 827 Bytes
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const xdepend = require('.');
const cli = meow(`
Usage
$ xdepend [input]
Options
-f, --force Force upgraded dependencies (only if you know breaking changes)
-o, --output <filename>
-i, --interactive Interactive Mode, we ask you which version you'd like to have
-r, --report creates a nice report
Examples
$ xdepend
unicorns & rainbows
$ xdepend ponies
ponies & rainbows
`, {
flags: {
force: {
type: 'boolean',
alias: 'f'
},
output: {
type: 'string',
alias: 'o'
},
interactive: {
type: 'boolean',
alias: 'i'
},
report: {
type: 'boolean',
alias: 'r'
}
}
});
xdepend(cli.flags).then(cliOutput => {
if (cliOutput) {
console.log(cliOutput);
} else {
console.log(':) No output');
}
});