forked from sendbird/sendbird-uikit-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplopfile.js
32 lines (32 loc) · 943 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
31
32
module.exports = function (plop) {
// create your generators here
plop.setGenerator('basic component', {
description: 'this will create a ui component with all necessary subitems - test, scss etc',
prompts: [{
type: 'input',
name: 'name',
message: 'Please name your component',
}], // array of inquirer prompts
actions: [{
// add jsx
type: 'add',
path: 'src/ui/{{name}}/index.tsx',
templateFile: 'plop-templates/tsx.hbs',
}, {
// add scss
type: 'add',
path: 'src/ui/{{name}}/index.scss',
templateFile: 'plop-templates/scss.hbs',
}, {
// add test
type: 'add',
path: 'src/ui/{{name}}/__tests__/{{name}}.spec.js',
templateFile: 'plop-templates/test.hbs',
}, {
// add story
type: 'add',
path: 'src/ui/{{name}}/stories/{{name}}.stories.js',
templateFile: 'plop-templates/stories.hbs',
}],
});
};