-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta.js
39 lines (39 loc) · 984 Bytes
/
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
module.exports = {
prompts: {
name: {
type: 'string',
required: true,
label: 'Project name'
},
description: {
'type': 'string',
'required': true,
'label': 'Project description',
'default': 'A Vue.js plugin'
},
author: {
'type': 'string',
'label': 'Author'
},
version: {
'type': 'string',
'required': true,
'label': 'Project version',
'default': '0.0.1'
}
},
skipInterpolation: '**/*.vue',
helpers: {
camelcase: (s) => {
return s.replace (/(?:^|[-])(\w)/g, (_,c) => {
return c ? c.toUpperCase () : '';
})
},
kebabcase: (s) => {
return s.replace(/([a-z])([A-Z])/g, '$1-$2')
.replace(/\s+/g, '-')
.toLowerCase();
}
},
completeMessage: '{{#inPlace}}To get started:\n\n yarn install\n yarn run build.{{else}}To get started:\n\n cd {{destDirName}}\n yarn install\n yarn run build{{/inPlace}}'
}