baldrick-whisker
v0.13.0
Published
Code generator for Elm and Typescript using templates
Downloads
40
Maintainers
Readme
baldrick-whisker
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:
CLI Examples
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.jsonQuickstart
Install 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
Configuration
Config files:
- ``:
- ``:
Architecture
- 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.
FAQ
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.
Troubleshooting
- →
- →
- →
- →
Documentation and links
- Code Maintenance :wrench:
- Code Of Conduct
- Api for baldrick-whisker
- Contributing :busts_in_silhouette: :construction:
- Diagram for the code base :triangular_ruler:
- Vocabulary used in the code base :book:
- Architectural Decision Records :memo:
- 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
Related
Installation
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 [email protected]:flarebyte/baldrick-whisker.git
yarn global add `pwd`