hdlbr - Handlebars CLI
hdlbr VARIABLES_FILE TEMPLATE_FILE
Where:
- VARIABLES_FILE is a YAML or JSON map, listing all vars.
- TEMPLATE_FILE is a Handlebars template.
vars.json
:
{
"name": "Foo",
"comments": [
{
"author": "Dracula"
},
{
"author": "Alucard"
}
]
}
template.hbs
:
Result of hdlbr vars.json template.hbs
:
Hello Foo
Dracula
Alucard
Another example with YAML format:
vars.yaml
:
name: nginx
version: '1.0.0'
template.hbs
:
Result of hdlbr vars.yaml template.hbs
:
docker pull "nginx:1.0.0"
You may use Rust 2018 and Cargo to build:
cargo build --release