1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | const { template, deleteFiles } = require('mrm-core')
|
11 | const { join } = require('path')
|
12 | const debug = require('debug')('adonis:mrm-github')
|
13 |
|
14 | class StandardTemplate {
|
15 | constructor () {
|
16 | this.issues = '.github/ISSUE_TEMPLATE.md'
|
17 | }
|
18 |
|
19 | |
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | up () {
|
27 | debug('using template: %s', this.issues)
|
28 | template(this.issues, join(__dirname, 'templates', 'issues.md')).apply().save()
|
29 | }
|
30 |
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | down () {
|
39 | debug('removing template: %s', this.issues)
|
40 | deleteFiles(this.issues)
|
41 | }
|
42 | }
|
43 |
|
44 | module.exports = new StandardTemplate()
|