forked from NehemiahK/fun-react-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplopfile.js
30 lines (30 loc) · 818 Bytes
/
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
module.exports = (plop) => {
// component generator
plop.setGenerator('component', {
description: 'React component generator',
prompts: [
{
type: 'input',
name: 'name',
message: 'component name please',
},
],
actions: [
{
type: 'add',
path: 'src/components/{{pascalCase name}}/{{pascalCase name}}.jsx',
templateFile: 'plop-templates/Component.jsx.hbs',
},
{
type: 'add',
path: 'src/components/{{pascalCase name}}/{{pascalCase name}}.scss',
templateFile: 'plop-templates/Component.scss.hbs',
},
{
type: 'add',
path: 'src/components/{{pascalCase name}}/{{pascalCase name}}.test.jsx',
templateFile: 'plop-templates/Component.test.jsx.hbs',
}
]
});
};