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

/handlebars-cmd/

    Package Sidebar

    Install

    npm i handlebars-cmd

    Weekly Downloads

    1,964

    Version

    0.1.4

    License

    BSD

    Last publish

    Collaborators

    • spion