forked from debut-js/Strategies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplopfile.js
29 lines (28 loc) · 823 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
const strategies = './src/strategies';
const templates = './plop-templates';
module.exports = function (plop) {
plop.setGenerator('strategy', {
description: 'Create new strategy',
prompts: [
{
type: 'input',
name: 'name',
message: 'Enter strategy name:',
},
],
actions: [
{
type: 'addMany',
base: `${templates}/strategy`,
templateFiles: `${templates}/strategy/**/*`,
destination: `${strategies}/{{path}}/`,
},
{
type: 'modify',
path: `./schema.json`,
pattern: /]/g,
templateFile: `${templates}/schemaOption.hbs`,
},
],
});
};