-
Notifications
You must be signed in to change notification settings - Fork 1
/
prompts.js
58 lines (56 loc) · 1.53 KB
/
prompts.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
const locales = require('i18n-locales');
const versions = require('./utils/versions')
function toChoices(array, selected) {
return array.map(name => ({ name, value: name, checked: name === selected }));
}
module.exports = [
{
type: 'list',
default: versions[0].version,
name: 'neutroniumVersion',
message: 'Choose Neutronium targeted version',
choices: versions.map(v => ({ name: v.version, value: v.version}))
},
{
type: 'confirm',
name: 'useRootVm',
message: 'Use root vm plugin to access viewModel as $rootVm attribute from vue components?',
default: true,
},
{
type: 'confirm',
name: 'useRouter',
message: 'Use router with vue-router integrated with Neutronium?',
default: false,
},
{
type: 'confirm',
name: 'useInternationalization',
message: 'Use internationalization with vue-i18n integrated with Neutronium?',
default: false,
group: "Internationalization"
},
{
type: 'input',
name: 'resourceFileName',
when: answer => answer.useInternationalization,
message: 'Resource file name (.resx C# file)?',
default: 'Resource',
group: "Internationalization"
},
{
type: 'input',
name: 'nameSpace',
when: answer => answer.useInternationalization,
message: 'Resource namespace:',
group: "Internationalization"
},
{
type: 'checkbox',
name: 'locales',
when: answer => answer.useInternationalization,
message: 'Project locales?',
choices: toChoices(locales, 'en-US'),
group: "Internationalization"
},
]