-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprompts.js
54 lines (52 loc) · 1.43 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
module.exports = pkg => {
if (!pkg.devDependencies['vue-cli-plugin-vuetify']) {
throw new Error('This plugin requires vuetify, please run "vue add vuetify" then try again.')
}
if (!pkg.devDependencies['@vue/cli-plugin-vuex']) {
throw new Error('This plugin requires vuex, please run "vue add vuex" then try again.')
}
const prompts = [
{
type: 'list',
name: 'locale',
message: 'The default locale of the application.',
validate: input => !!input,
default: 'fr',
choices: ['fr', 'en']
},
{
type: 'input',
name: 'title',
message: 'The title of the application.',
validate: input => !!input,
default: pkg.name
},
{
type: 'input',
name: 'id',
message: 'The id of the application.',
validate: input => !!input,
default: pkg.name
},
{
type: 'input',
name: 'description',
message: 'The description of the application.',
validate: input => !!input
},
{
type: 'input',
name: 'keywords',
message: 'Comma separated list of keywords.',
validate: input => !!input,
filter: input => input.split(',').map(keyword => keyword.trim()).filter(keyword => !!keyword)
},
{
type: 'confirm',
name: 'iframeResizer',
message: 'Use iframe-resizer to resize the application when it is integrated in websites.',
default: true
}
]
return prompts
}