-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.js
35 lines (27 loc) · 857 Bytes
/
template.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
34
35
'use strict'
/**
* This pipeline will checkout a sample respository, parse files as mustach and replace the original content.
*/
const Bootme = require('./../packages/bootme')
const GitcloneTask = require('./../packages/bootme-gitclone')
const TemplateTask = require('./../packages/bootme-template')
const registry = new Bootme.Registry()
const pipeline = new Bootme.Pipeline(registry)
const cloneTask = new GitcloneTask('gitclone')
cloneTask.setConfig({
url: 'https://github.com/netzkern/eslint-config-netzkern-base',
path: '/test-checkout'
})
registry.addTask(cloneTask)
const replaceTask = new TemplateTask('replace')
replaceTask.setConfig({
refs: {
url: 'gitclone' // Point to result of previous task
},
templateData: {
project: 'Hello BootMe!'
},
files: ['README.md']
})
registry.addTask(replaceTask)
pipeline.execute()