1 |
|
2 | <a href="https://github.com/coz-labo/coz"><img style="height:128px;" src="doc/images/coz-banner.png" height="128"/></a>
|
3 |
|
4 |
|
5 | ```javascript
|
6 | // Define rendering rule.
|
7 | module.exports = {
|
8 | path: 'have-a-nice-day.txt', // File path to write
|
9 | tmpl: '.have-a-nice-day.txt.hbs', // Template file
|
10 | force: true, // Overwrite each time
|
11 | mode: '444', // As readyonly file
|
12 | data: require('./my-datasource.json') // Data to render
|
13 | }
|
14 | ```
|
15 |
|
16 | Save this as ***.my-first-bud.bud*** , then running
|
17 |
|
18 | ```bash
|
19 | $ coz render ".my-first-bud.bud"
|
20 | ```
|
21 |
|
22 | will do the magic.
|