-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplopfile.cjs
64 lines (64 loc) · 1.81 KB
/
plopfile.cjs
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
module.exports = function (plop) {
plop.setGenerator('module', {
description: 'Generate a new module with standard structure',
prompts: [
{
type: 'input',
name: 'name',
message: 'Module name (e.g., auth, payments)',
},
],
actions: [
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/api/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/components/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/constants/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/hooks/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/pages/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/templates/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/types/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/validations/index.ts',
templateFile: 'plop-templates/index.ts.hbs',
},
{
type: 'add',
path: 'src/modules/{{kebabCase name}}/README.md',
templateFile: 'plop-templates/index.ts.hbs',
},
],
});
};