-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
41 lines (31 loc) · 944 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
34
35
36
37
38
39
40
41
#!/usr/bin/env node
/**
* shebang line for nix systems, npm will take care of making it work on windows
*/
const Operation = require('./src/Operation');
const program = require('commander');
const pkg = require('./package.json');
program.version(pkg.version, '-v, --version');
program
.command('run')
.description('Run a specific tomcat.')
.option('-l, --log [boolean]', 'Log complete output.')
.action(Operation.run);
program
.command('add')
.description('Configure a new tomcat.')
.action(Operation.add);
program
.command('rm')
.description('Remove an available tomcat.')
.action(Operation.rm);
program
.command('list')
.description('List all available tomcat.')
.action(Operation.list);
program
.command('open')
.description('Open tomcat folder in file explorer.')
.action(Operation.open);
program.parse(process.argv);
if (program.args.length === 0) program.help()