npm.io
0.0.1 • Published 9 years agoCLI

handlebarsjs-cli

Licence
MIT
Version
0.0.1
Deps
2
Vulns
0
Weekly
0

handlebarsjs-cli

Invoke handlebars from the commandline.

Example:

echo "Hello {{name}}" | handlebarsjs-cli --name Test

Output:

Hello Test

You may also pass a JSON string as an argument and it will be interpreted as an object.

You can also pass a JSON file:

handlebarsjs-cli data.json < template.tpl > output.txt

install

npm install -g handlebarsjs-cli

include helper

handlebars-cli comes with a built-in helper #include

{{{include 'api.md'}}}

You can also pass context (optional)

{{{include 'render.md.hbs' item}}}

license

MIT

Keywords