keithamus / hbs-cli

A CLI for handlebars
43 stars 26 forks source link

Accept data directly from stdin #54

Closed mcandre closed 4 years ago

mcandre commented 5 years ago

Writing data first to JSON, secondly to Handlebars, and thirdly rendering, can be a bit indirect. For example, the data may originate from environment variables, which would be great for flags, but require yet another tool like jq, in order to forward to hbs-cli.

Could we get the ability to declare data directly with stdin, optionally skipping writing any JSON files? This is similar to how mustache CLI and gotpl work. Or the handlebars.js cli ( https://handlebarsjs.com/precompilation.html )

keithamus commented 5 years ago

Thanks for raising this issue @mcandre. PRs are welcome for this project!