-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrest-panda.js
More file actions
41 lines (35 loc) · 1002 Bytes
/
Copy pathrest-panda.js
File metadata and controls
41 lines (35 loc) · 1002 Bytes
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
const {prompt} = require('inquirer');
const cli = require('commander');
const questions = [
{
type: 'input',
name: 'username',
message: 'Enter username account:'
},
{
type: 'password',
name: 'password',
message: 'Enter password account:'
}
]
cli
.version('0.0.1')
.usage('[command] <params>')
.description('CLI to manager the Rest Panda project');
cli
.command('gen-client <platform>')
.action(function (platform, cmd) {
console.log('*** Please inform your credentials to access the Rest Panda account ***');
prompt(questions)
.then(answers => console.log(answers))
})
cli
.command('gen-server <platform>')
.action(function (platform, cmd) {
console.log('*** Please inform your credentials to access the Rest Panda account ***');
prompt(questions)
.then(answers => console.log(answers))
})
cli
.parse(process.argv);