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
hof gen -h
- hof demos
- code-generation/file-rendering
- code-generation/type-rendering
- reference/hof-gen/adhoc-file-gen
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