-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeta.js
80 lines (77 loc) · 1.76 KB
/
meta.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module.exports = {
prompts: {
name: {
type: "string",
required: true,
label: "Project name"
},
description: {
type: "string",
required: true,
label: "Project description",
default: "A Vue.js project"
},
author: {
type: "string",
label: "Author"
},
license: {
type: "string",
label: "License",
default: "ISC"
},
plugins: {
type: "checkbox",
message: "Select which Vue plugins to install",
choices: ['axios', 'vue-router', 'vuex'],
default: ['axios', 'vue-router', 'vuex']
},
style: {
type: "list",
message: "Select which style to install",
choices: [
{
name: 'sass',
value: 'sass',
},
{
name: 'less',
value: 'less',
},
{
name: 'stylus',
value: 'stylus',
},
]
},
eslint: {
type: 'confirm',
require: true,
message: 'Use linting with ESLint?',
default: true
},
runner: {
type: 'confirm',
require: true,
message: 'Use unit test?',
default: true
},
},
helper: {
deps (plugins) {
let output = ''
let dependencies = {
'axios': '^0.16.1',
'vue-router': '^2.5.3',
'vuex': '^2.3.1'
}
if (Object.keys(plugins).length > 0) output += ',\n'
Object.keys(plugins).forEach((p, i) => {
output += ` "${p}": "${dependencies[p]}"`
if (i !== Object.keys(plugins).length - 1) output += ',\n'
})
return output
},
},
completeMessage: "{{#inPlace}}To get started:\n\n npm install\n npm run dev{{else}}To get started:\n\n cd {{destDirName}}\n npm install\n npm run dev{{/inPlace}}"
}