-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (30 loc) · 976 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
const program = require('commander');
const inquirer = require('inquirer');
module.exports = () => {
program
.command('help')
.alias('h')
.description('Show help menu')
.action(() => {
console.log('help');
});
program
.command('new <name>')
.alias('n')
.description('Create new project')
.option('-d, --default', 'Pass default values')
.action((name, args) => {
if (args.default) {
console.log('default project');
}
const questions = [
{type: 'list', name: 'ProjectType', message: 'What type of project do you want to set up?', choices: ['App', 'App with Node back-end', 'Website']}
]
inquirer
.prompt(questions)
.then( (answers) => {
console.log(answers);
})
});
program.parse(process.argv);
}