-
Notifications
You must be signed in to change notification settings - Fork 0
/
plopfile.js
38 lines (37 loc) · 979 Bytes
/
plopfile.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
export default function (plop) {
// create your generators here
plop.setGenerator('component', {
description: 'To create a new component',
prompts: [
{
type: 'input',
name: 'name',
message: 'Please give a name to your new component',
},
], // array of inquirer prompts
actions: [
{
type: 'add',
path: 'components/{{kebabCase name}}.vue',
templateFile: 'plop-templates/vue-component.hbs',
},
], // array of actions
})
plop.setGenerator('project', {
description: 'To create a new project',
prompts: [
{
type: 'input',
name: 'projectName',
message: 'Please give a name to your new project',
},
], // array of inquirer prompts
actions: [
{
type: 'add',
path: 'content/projects/{{kebabCase projectName}}.md',
templateFile: 'plop-templates/base-project.hbs',
},
], // array of actions
})
}