forked from gatsbyjs/gatsby
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplopfile.js
49 lines (49 loc) · 1.28 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
module.exports = function(plop) {
// create your generators here
plop.setGenerator(`package`, {
description: `This is sets up the basic files for a new package.`,
prompts: [
{
type: `input`,
name: `name`,
message: `name of new package`,
},
{
type: `input`,
name: `author`,
message: `Your name/email for putting in the package.json of the new package`,
},
],
actions: [
{
type: `add`,
path: `packages/{{kebabCase name}}/package.json`,
templateFile: `plop-templates/package.json.hbs`,
},
{
type: `add`,
path: `packages/{{kebabCase name}}/index.js`,
templateFile: `plop-templates/index.js.hbs`,
},
{
type: `add`,
path: `packages/{{kebabCase name}}/README.md`,
templateFile: `plop-templates/README.md.hbs`,
},
{
type: `add`,
path: `packages/{{kebabCase name}}/.gitignore`,
templateFile: `plop-templates/.gitignore.hbs`,
},
{
type: `add`,
path: `packages/{{kebabCase name}}/.npmignore`,
templateFile: `plop-templates/.npmignore.hbs`,
},
{
type: `add`,
path: `packages/{{kebabCase name}}/src/.gitkeep`,
},
],
})
}