UNPKG

1.03 kBtext/x-handlebars-templateView Raw
1Specifications
2---------
3
4<a name="spec-bud-spec"></a>
5### Bud File Specification
6
7{{vars.bud.about}}
8
9You can specify bud data by writing `.bud` file, which is actually a javascript file and could be written in Node.js format.
10
11```javascript
12module.exports = {
13 path: 'my_file.txt',
14 tmpl: '.my_file.txt.hbs',
15 data: require('./.my_data')
16}
17```
18
19And bud could be an array like:
20
21```javascript
22module.exports = [
23 { path: 'my_file.txt', /* ... */ },
24 { path: 'my_other_file.txt', /* ... */ },
25]
26```
27
28Or an async function.
29
30```javascript
31module.exports = function(callback){
32 myAsync((data) => {
33 let error = null
34 callback(err, data)
35 })
36}
37```
38
39For more details, see tutorial section "[03 - Mastering coz bud][03_mastering_coz_bud_url]".
40
41##### Supported Properties
42
43List of properties configurable in bud files.
44
45| Name | Type | Default | Description |
46| ----- | ----- | ----- | ----- |
47{{#each vars.bud.properties}}{{#if configurable}}| `{{@key}}` | {{{type}}} | {{default}} | {{description}} |
48{{/if}}{{/each}}
49
50
\No newline at end of file