2 releases
0.1.1 | Jun 17, 2019 |
---|---|
0.1.0 | Jun 17, 2019 |
#586 in Template engine
4KB
hdlbr - Handlebars CLI
Usage
hdlbr VARIABLES_FILE TEMPLATE_FILE
Where:
- VARIABLES_FILE is a JSON map, listing all vars.
- TEMPLATE_FILE is a Handlebars template.
Example
vars.json
:
{
"name": "Foo",
"comments": [
{
"author": "Dracula"
},
{
"author": "Alucard"
}
]
}
template.hbs
:
Hello {{name}}
{{~#each comments}}
{{author}}
{{~/each~}}
Result of hdlbr vars.json template.hbs
:
Hello Foo
Dracula
Alucard
Build
You may use Rust 2018 and Cargo to build:
cargo build --release
Dependencies
~6–8MB
~142K SLoC