-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathprompts.js
More file actions
51 lines (50 loc) · 1.23 KB
/
prompts.js
File metadata and controls
51 lines (50 loc) · 1.23 KB
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
const localeList = require('./lang.js')
const componentList = require('./components.js')
module.exports = [
{
type: 'list',
name: 'lang',
message: 'Choose the locale you want to load',
choices: localeList.map(locale => ({
name: locale,
value: locale
})),
default: 'zh-CN'
},
{
type: 'list',
name: 'import',
message: 'How do you want to import Element?',
choices: [
{ name: 'Fully import', value: 'full' },
{ name: 'Import on demand', value: 'partial' }
],
default: 'full',
},
{
when: answers => answers.import === 'partial',
type: 'checkbox',
name: 'components',
message: 'Choose the components you want to load',
choices: componentList.map(component => ({
name: component,
value: component,
checked: true
}))
},
{
when: answers => answers.import === 'full',
type: 'confirm',
name: 'customTheme',
message: 'Do you wish to overwrite Element\'s SCSS variables?',
default: false,
},
{
when: answers => answers.customTheme === true,
name: 'themeColor',
type: 'color',
message: 'Theme color',
description: 'This is used to change the system UI color around the app',
default: '#0073e8'
}
]