-
Notifications
You must be signed in to change notification settings - Fork 0
/
plopfile.mjs
87 lines (87 loc) · 1.97 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
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
81
82
83
84
85
86
87
export default function (
/** @type {import('plop').NodePlopAPI} */
plop
) {
plop.setGenerator('plugin', {
description: 'Create a new plugin project',
prompts: [
{
type: 'input',
name: 'name',
message: 'name of the project'
}
],
actions: [
{
type: 'add',
path: 'plugins/{{name}}/ts/{{camelCase name}}Plugin.spec.ts',
templateFile: 'plops/plugins/ts/plugin.spec.ts.hbs'
},
{
type: 'add',
path: 'plugins/{{name}}/ts/{{camelCase name}}Plugin.ts',
templateFile: 'plops/plugins/ts/plugin.ts.hbs'
},
{
type: 'add',
path: 'plugins/{{name}}/ts/index.ts',
templateFile: 'plops/plugins/ts/index.ts.hbs'
},
{
type: 'add',
path: 'plugins/{{name}}/.depcheckrc.yml',
templateFile: 'plops/plugins/.depcheckrc.yml'
},
{
type: 'add',
path: 'plugins/{{name}}/.eslintignore',
templateFile: 'plops/plugins/.eslintignore'
},
{
type: 'add',
path: 'plugins/{{name}}/.eslintrc.cjs',
templateFile: 'plops/plugins/.eslintrc.cjs'
},
{
type: 'add',
path: 'plugins/{{name}}/.gitignore',
templateFile: 'plops/plugins/.gitignore'
},
{
type: 'add',
path: 'plugins/{{name}}/.size-limit.json',
templateFile: 'plops/plugins/.size-limit.json'
},
{
type: 'add',
path: 'plugins/{{name}}/jest.config.mjs',
templateFile: 'plops/plugins/jest.config.mjs.hbs'
},
{
type: 'add',
path: 'plugins/{{name}}/LICENSE',
templateFile: 'plops/plugins/LICENSE'
},
{
type: 'add',
path: 'plugins/{{name}}/package.json',
templateFile: 'plops/plugins/package.json.hbs'
},
{
type: 'add',
path: 'plugins/{{name}}/README.md',
templateFile: 'plops/plugins/README.md.hbs'
},
{
type: 'add',
path: 'plugins/{{name}}/tsconfig.json',
templateFile: 'plops/plugins/tsconfig.json'
},
{
type: 'add',
path: 'plugins/{{name}}/tsconfig.cjs.json',
templateFile: 'plops/plugins/tsconfig.cjs.json'
}
]
})
}