github hofstadter-io/hof v0.6.3

latest releases: v0.6.10-rc.1, v0.6.9, v0.6.9-rc.2...
2 years ago

v0.6.2...v0.6.3

hof gen adhoc mode

Adds flags to hof gen to support adhoc code gen,
so you do not need to setup a generator to use.

  • --template/-T flag to specify templates, input data, schemas, and output files
  • --partial/-P flag to support adhoc partial templates
  • --watch/-w flag to suport watching globs and regenerating (also works for generators)
  • --as-module flag turns your other flags into a reusable and sharable generator module
  • --init flag bootstraps a new modular generator in the current directory

The -T flag has a flexible format so you can
supply multiple templates and control the data.
It lets you specify the mapping from template
to input & schema, to output filepath.

hof gen data.cue -T template.txt
hof gen data.yaml schema.cue -T template.txt > output.txt

See the following to learn more

Other

  • added dict to template helpers to create maps, useful for passing more than one arg to a partial template
  • added pascal template helper for string casing
  • load data with CUE code, more inline with cue
  • (bug) remove some shell completetion hacks
  • more tests, bugfixes, and dep updates
  • some small changes to the datamodel schema, namely attribute change to prep for enhancemnts

Don't miss a new hof release

NewReleases is sending notifications on new releases.