-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplopfile.js
More file actions
46 lines (46 loc) · 1.08 KB
/
plopfile.js
File metadata and controls
46 lines (46 loc) · 1.08 KB
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
module.exports = (plop) => {
plop.setGenerator('component', {
description: 'Create a component',
prompts: [
{
type: 'input',
name: 'name',
message: 'What is your component name?',
},
],
actions: [
{
type: 'add',
path: 'src/components/{{pascalCase name}}/index.js',
templateFile: 'plop-templates/Component.js.hbs',
},
{
type: 'add',
path: 'src/components/{{pascalCase name}}/style.js',
templateFile: 'plop-templates/Styles.js.hbs',
},
],
});
plop.setGenerator('screen', {
description: 'Create a screen',
prompts: [
{
type: 'input',
name: 'screen',
message: 'What is your screen name?',
},
],
actions: [
{
type: 'add',
path: 'src/screens/{{pascalCase screen}}/index.js',
templateFile: 'plop-templates/Screen.js.hbs',
},
{
type: 'add',
path: 'src/screens/{{pascalCase screen}}/style.js',
templateFile: 'plop-templates/Styles.js.hbs',
},
],
});
};