handlebars-cmd

0.1.4 • Public • Published

handlebars-cmd

Invoke handlebars from the commandline.

Example:

echo "Hello {{name}}" | handlebars --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:

handlebars file.json < template.hbs > output.txt

install

npm install -g handlebars-cmd

include helper

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

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

You can also pass context (optional)

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

license

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.4
    4,414
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.4
    4,414
  • 0.1.3
    1
  • 0.1.2
    1
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i handlebars-cmd

Weekly Downloads

1,935

Version

0.1.4

License

BSD

Last publish

Collaborators

  • spion