Code generator for Elm and Typescript using templates
Code generator for Elm and Typescript using templates
baldrick-whisker is an ESM-only CLI that reads JSON, YAML, CSV and Elm sources, merges them into a single object, and renders Handlebars templates for Elm/Markdown/JSON/YAML outputs. Ships with rich helpers and supports GitHub file URIs. Requires Node.js >= 22.
Highlights:
Merge JSON + Elm to YAML:
npx baldrick-whisker object report/out.yaml package.json
pest-spec/fixtures/Example.elmRender Handlebars template:
npx baldrick-whisker render report/out.yaml pest-spec/fixtures/example.hbs
report/rendered.mdShow diff instead of writing:
npx baldrick-whisker render --diff report/out.yaml
pest-spec/fixtures/example.hbs report/rendered.mdDrop extension on destination:
npx baldrick-whisker object --no-ext report/out.json package.jsonInstall globally or run with npx, then try the object and render commands.
- yarn global add baldrick-whisker
- baldrick-whisker --help
- npx baldrick-whisker object out.yaml a.json b.yaml spec/fixtures/Example.elm
- npx baldrick-whisker render out.yaml pest-spec/fixtures/example.hbs rendered.md
Config files:
- ``:
- ``:
- file-io reads/writes files, compiles Handlebars, and registers helpers.
- merge-objects normalizes InputContent and merges primitives/objects/arrays.
- handlebars-helpers provides ifSatisfy, listJoin and string transformers.
- cli wiring via Commander exposes object and render commands.
Q: How do I point whisker to a custom config file?
A: Set BALDRICK_WHISKER_CONFIG to the YAML file location. The loader will use it instead of the default ~/.baldrick-whisker/config.yaml.
- →
- →
- →
- →
- Code Maintenance 🔧
- Code Of Conduct
- Api for baldrick-whisker
- Contributing 👥 🚧
- Diagram for the code base 📐
- Vocabulary used in the code base 📖
- Architectural Decision Records 📝
- Contributors :busts_in_silhouette:
- Dependencies
- Glossary :book:
- Software engineering principles :gem:
- Overview of Flarebyte.com ecosystem :factory:
- Usage
- API
- Code Maintenance
- Contributing
- Glossary
- Vocabulary
- Design
- ADR
This package is ESM only.
yarn global add baldrick-whisker
baldrick-whisker --helpOr alternatively run it:
npx baldrick-whisker --helpIf you want to tun the latest version from github. Mostly useful for dev:
git clone git@github.com:flarebyte/baldrick-whisker.git
yarn global add `pwd`