forked from britecharts/britecharts-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plopfile.js
47 lines (47 loc) · 1.79 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
module.exports = function(plop) {
plop.setHelper('openBrace', () => '{');
plop.setHelper('closeBrace', () => '}');
plop.setGenerator('component', {
description: 'Create a new component',
prompts: [{
type: 'input',
name: 'componentName',
message: 'Component name (with PascalCase capitalization, eg StackedArea)',
}],
actions: [{
type: 'add',
path: 'src/charts/{{camelCase componentName}}/{{camelCase componentName}}Chart.test.js',
templateFile: 'src/charts/template/componentChart.test.js',
},
{
type: 'add',
path: 'src/charts/{{camelCase componentName}}/{{camelCase componentName}}Chart.js',
templateFile: 'src/charts/template/componentChart.js',
},
{
type: 'add',
path: 'src/charts/{{camelCase componentName}}/{{camelCase componentName}}Chart.fixtures.js',
templateFile: 'src/charts/template/componentChart.fixtures.js',
},
{
type: 'add',
path: 'src/charts/{{camelCase componentName}}/{{pascalCase componentName}}.js',
templateFile: 'src/charts/template/Component.js',
},
{
type: 'add',
path: 'src/charts/{{camelCase componentName}}/{{pascalCase componentName}}.test.js',
templateFile: 'src/charts/template/Component.test.js',
},
{
type: 'add',
path: 'src/charts/{{camelCase componentName}}/Readme.md',
templateFile: 'src/charts/template/Readme.md',
},
{
type: 'add',
path: 'src/charts/{{camelCase componentName}}/Checklist.md',
templateFile: 'src/charts/template/Checklist.md',
}],
});
};