1 |
|
2 |
|
3 | const tmplconv = require('tmplconv')
|
4 |
|
5 | // Generate template from existing directory
|
6 | tmplconv.tmplify('demo/demo-app', 'asset/app-tmpl', {
|
7 | // Patterns of files to tmplify
|
8 | pattern: [
|
9 | 'lib/*.js',
|
10 | 'test/*_test.js'
|
11 | ],
|
12 | // Rule to tmplify
|
13 | data: {
|
14 | 'name': 'my-awesome-app',
|
15 | 'description': "This is an example for the app templates."
|
16 | }
|
17 | }).then((result) => {
|
18 | /* ... */
|
19 | })
|