I know how to use handlebars from java, but if I'd like to register some extensions, and compile some template to generate file with some testing data. npm install -g handlebars
gives me some command to precompile templates, but I cannot find anything to evaluate that templates. I found only some very old unmaintained tool, but is there some correct way, up to date, official?
Ok, I still don't know if it's the OK way, but after a lot of search, I found hbs-cli
tool(https://github.com/keithamus/hbs-cli). So usage could be
Install:
npm install -g hbs-cli
invocation:
hbs --data <(echo '{"who":"world"}') <(echo 'Hello {{who}}!') --stdout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With