forked from grafana/oncall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplopfile.js
33 lines (26 loc) · 1.24 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
const createComponentFiles = require('./tools/plop/generators/createComponentFiles');
const createContainerFiles = require('./tools/plop/generators/createContainerFiles');
const createModelFiles = require('./tools/plop/generators/createModelFiles');
const componentPrompts = require('./tools/plop/prompts/componentPrompts');
const containerPrompts = require('./tools/plop/prompts/containerPrompts');
const modelPrompts = require('./tools/plop/prompts/modelPrompts');
// const configNeededHelper = require('./tools/plop/helpers/configNeeded');
module.exports = function plopGenerator(plop) {
plop.setWelcomeMessage('What can I do for you?');
// plop.setHelper('configNeeded', configNeededHelper);
plop.setGenerator('Create model files', {
description: 'Create model',
prompts: modelPrompts,
actions: (answers) => createModelFiles(answers),
});
plop.setGenerator('Create component files', {
description: 'Create component and CSS module for it',
prompts: componentPrompts,
actions: (answers) => createComponentFiles(answers),
});
plop.setGenerator('Create container files', {
description: 'Create component connected to store',
prompts: containerPrompts,
actions: (answers) => createContainerFiles(answers),
});
};