#properties #json #cli

app handlebars-cli

Template JSON properties into Handlebars templates from the CLI

1 stable release

1.0.0 Nov 29, 2019

#545 in Template engine

MIT license

9KB
52 lines

Handlebars CLI Build Status Crates.io Version Of handlebars-cli

Template JSON properties into Handlebars templates from the CLI.

Install

You can easily install this using Cargo:

cargo install handlebars-cli

You can also do a simple cargo build --release in the cloned out version of this repository to get a binary (only stable Rust is required).

Usage

$ handlebars-cli --help
handlebars-cli — Template JSON properties into Handlebars templates from the CLI.

USAGE:
    handlebars-cli <JSON> <TEMPLATE>
    handlebars-cli --help

PARAMETERS:
    JSON: A set of valid JSON to use as properties to interpolate into the provided template file.
    TEMPLATE: A path to a valid Handlebars template.

FLAGS:
    --help: Prints this usage text.

Example

$ echo "Hello {{name.first}} {{name.last}}!" > template.hbs
$ handlebars-cli '{ "name": { "first": "Foo", "last": "Bar" }}' template.hbs
Hello Foo Bar!

License

Licensed under MIT license (LICENSE or http://opensource.org/licenses/MIT).

Dependencies

~5MB
~102K SLoC