forked from suhank/zea-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplopfile.js
32 lines (31 loc) · 795 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 = (plop) => {
plop.setHelper('openCommentBlock', () => '{{{')
plop.setGenerator('e2e-test', {
description: 'E2E test',
prompts: [
{
type: 'input',
name: 'name',
message: 'E2E test name',
},
],
actions: [
{
type: 'add',
path: 'cypress/integration/{{dashCase name}}-spec.js',
templateFile: 'plop-templates/e2e-test-spec.js',
},
{
type: 'add',
path: 'testing-e2e/{{dashCase name}}.html',
templateFile: 'plop-templates/e2e-test-page.html',
},
{
type: 'append',
path: 'testing-e2e/index.html',
pattern: '</li>',
template: ' <li><a href="{{dashCase name}}.html">{{dashCase name}}</a></li>',
},
],
})
}