-
Notifications
You must be signed in to change notification settings - Fork 47
/
plopfile.mjs
62 lines (62 loc) · 1.71 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
export default function (
/** @type {import('plop').NodePlopAPI} */
plop
) {
plop.setGenerator('facet', {
description: 'Generates boilerplate for a new facet contract.',
prompts: [
{
type: 'input',
name: 'name',
message: 'Give this facet a name: e.g Acme will create AcmeFacet',
},
{
type: 'input',
name: 'description',
message: 'Describe what this facet does:',
},
{
type: 'input',
name: 'author',
message: 'Who is the author of this facet?',
},
{
type: 'input',
name: 'email',
message: 'What is the email of the author of this facet?',
},
], // array of inquirer prompts
actions: [
{
type: 'add',
path: 'src/Facets/{{properCase name}}Facet.sol',
templateFile: 'templates/facet.template.hbs',
},
{
type: 'add',
path: 'docs/{{properCase name}}Facet.md',
templateFile: 'templates/facetDoc.template.hbs',
},
{
type: 'add',
path: 'test/solidity/Facets/{{properCase name}}Facet.t.sol',
templateFile: 'templates/facetTest.template.hbs',
},
{
type: 'add',
path: 'config/{{kebabCase name}}.json',
templateFile: 'templates/facetConfig.template.hbs',
},
{
type: 'add',
path: 'script/deploy/facets/Deploy{{properCase name}}Facet.s.sol',
templateFile: 'templates/facetDeployScript.template.hbs',
},
{
type: 'add',
path: 'script/deploy/facets/Update{{properCase name}}Facet.s.sol',
templateFile: 'templates/facetUpdateScript.template.hbs',
},
], // array of actions
})
}