Skip to main content

Module templates

Module templates 

Source
Expand description

Template registry and expansion for torvyn init.

Templates are embedded in the binary. Each template provides a complete set of files needed for a specific component pattern.

Modules§

content
Embedded template file contents.

Structs§

Template
The complete set of files for a template.
TemplateFile
A single file in a template, with its relative path and content.
TemplateVars
Substitution variables available to templates.

Functions§

expand_template
Expand a template into real files at the specified directory.
get_template
Get the template for the given kind.
substitute
Apply variable substitution to a template string.
to_pascal_case
Convert a kebab-case string to PascalCase.