-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplopfile.mjs
executable file
·42 lines (42 loc) · 1.09 KB
/
plopfile.mjs
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
export default function (
/** @type {import('plop').NodePlopAPI} */
plop,
) {
// create your generators here
plop.setGenerator('basics', {
prompts: [
{
type: 'input',
name: 'name',
message: 'Name your resource: ',
},
], // array of inquirer prompts
actions: [
{
type: 'add',
path: 'src/modules/{{name}}/{{name}}.model.ts',
templateFile: 'templates/model.template.hbs',
},
{
type: 'add',
path: 'src/modules/{{name}}/{{name}}.messages.ts',
templateFile: 'templates/messages.template.hbs',
},
{
type: 'add',
path: 'src/modules/{{name}}/{{name}}.routes.ts',
templateFile: 'templates/routes.template.hbs',
},
{
type: 'add',
path: 'src/modules/{{name}}/{{name}}.service.ts',
templateFile: 'templates/service.template.hbs',
},
{
type: 'add',
path: 'src/modules/{{name}}/{{name}}.controller.ts',
templateFile: 'templates/controller.template.hbs',
},
], // array of actions
});
}