Custom templates¶
The template generator can load templates from a custom directory and/or custom template paths.
Use a custom template directory¶
Provide customTemplateDir in generatorOptions:
generator: "template"
generatorOptions:
templateSet: "custom"
customTemplateDir: "./templates"
classTemplatePath: "class.mustache"
Notes¶
- The generator still passes
templateVariablesto templates ascustomVariables.*. - Built-in templates expect
class.mustacheandmethod.mustachepartials; custom templates can choose their own structure. (UseclassTemplatePathto point at the class template and include partials from there.)