Setup
Generators are made of some CUE files and directories of templates.
You can run hof gen init <name> to bootstrap a new generator module.
Bootstrapping Your Generator
Throughout the first example, you will be building a code generation module. The following commands will create a new directory, git repository, and hof generator for you to start with.
Your working directory should now look like this:
You will often have other files depending on the languages or technologies you choose.
A common example are the files for dependency management like package.json and go.mod.
There are no restrictions or limits on what you can include.
The default directories:
schemais where your schemas for the other parts gogenholds CUE files for specifying your generatorstemplates,partials, andstaticsare files for generatorscreatorsare often in a subdirectory with their own templatesexamplesfor using your generators, also helpful for testing