forked from bradtraversy/customer-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.js
executable file
·62 lines (52 loc) · 1.11 KB
/
commands.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env node
const program = require('commander');
const { prompt } = require('inquirer');
const {
pwd,
} = require('./vessel');
const docker = require('./docker');
// Customer Questions
const questions = [
{
type: 'input',
name: 'firstname',
message: 'Customer First Name'
},
{
type: 'input',
name: 'lastname',
message: 'Customer Last Name'
},
{
type: 'input',
name: 'phone',
message: 'Customer Phone Number'
},
{
type: 'input',
name: 'email',
message: 'Customer Email Address'
}
];
program
.version('1.0.0', '-v, --version')
.description('Client Management System')
// List Command
program
.command('list')
.alias('l')
.description('List all customers')
.action(() => getList());
program
.command('pwd').alias('p')
.description('print working directory')
.action(() => pwd());
program
.command('start').alias('sta')
.description('start docker')
.action(() => docker.start());
program
.command('stop').alias('sto')
.description('stop docker')
.action(() => docker.stop());
program.parse(process.argv);