-
Notifications
You must be signed in to change notification settings - Fork 0
/
testinq.js
51 lines (45 loc) · 986 Bytes
/
testinq.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
'use strict';
var inquirer = require('inquirer')
function testFunc(somevar, other){
console.log(somevar)
console.log(other)
return ['a', 'x']
}
inquirer
.prompt([
{
type: 'input',
message: 'Enter the name of the Civilization.',
name: 'name'
},
{
type: 'input',
message: 'Enter a short code to be used as an abbreviation for the Civilization.',
name: 'code'
},
{
type: 'list',
message: 'Select the closest culture from the list to use as a default for empty configuration values.',
name: 'default_culture',
choices: testFunc
},
{
type: 'checkbox',
message: 'Select clothing:',
name: 'clothing',
choices: [
{
name: 'athens',
},
{
name: 'spartans',
},
{
name: 'epirotes',
},
],
},
])
.then((answers) => {
console.log(JSON.stringify(answers, null, ' '));
});