-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.js
63 lines (59 loc) · 1.2 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env node
const inquirer = require('inquirer')
const another = require('./described');
const generator = require('./generator');
const topMenu = [
{
key: 'mit',
name:'MIT License'
},
{
key:'gnu',
name:'GNU GPLv3'
},
{
key:'isc',
name:'ISC License'
},
{
key: 'apache',
name:'Apache License 2.0'
},
{
key: 'mozilla',
name:'Mozilla Public License 2.0'
},
{
key: 'bsd',
name:'BSD License'
},
{
key:'unlicense',
name:'The Unlicense'
},
{
key:'common',
name:'Common Development and Distribution License'
},
{
key: 'WTFPL',
name:'WTFPL (Do What The Fuck You Want To Public License)'
},
{
key: 'another',
name: 'I dont know anything, help me!'
},
]
console.clear()
inquirer.prompt({
type: 'list',
name: 'license',
message: 'Choose an open source license\n',
choices: topMenu,
}).then(answers => {
if(answers["license"] === "I dont know anything, help me!"){
another.default()
} else {
generator.default(answers["license"])
}
})