hdlbr

Crates.iohdlbr
lib.rshdlbr
version0.1.1
sourcesrc
created_at2019-06-17 15:23:35.486206
updated_at2019-06-17 15:42:09.240199
descriptionHandlebars CLI (Templating by command-line)
homepage
repositoryhttps://github.com/quitoque/hdlbr
max_upload_size
id141748
size4,416
Jérôme Arzel (jerome-arzel)

documentation

README

hdlbr - Handlebars CLI

Usage

hdlbr VARIABLES_FILE TEMPLATE_FILE

Where:

  • VARIABLES_FILE is a JSON map, listing all vars.
  • TEMPLATE_FILE is a Handlebars template.

Example

vars.json:

{
  "name": "Foo",
  "comments": [
    {
      "author": "Dracula"
    },
    {
      "author": "Alucard"
    }
  ]
}

template.hbs:

Hello {{name}}
{{~#each comments}}
  {{author}}
{{~/each~}}

Result of hdlbr vars.json template.hbs:

Hello Foo
  Dracula
  Alucard

Build

You may use Rust 2018 and Cargo to build:

cargo build --release
Commit count: 0

cargo fmt