Documentation ¶
Index ¶
- func GenerateForBundleMode(outputScriptPath string, imports []string, funcs []finder.FunctionToCall, ...) error
- func GenerateForInlineMode(outputScriptPath string, imports []string, funcs []finder.FunctionToCall, ...) error
- func RunTemplFmt(files []string, done chan<- struct{}) error
- func RunTemplGenerate(done chan<- struct{}) error
- type InputData
- type StringedData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateForBundleMode ¶ added in v1.1.0
func GenerateForBundleMode(outputScriptPath string, imports []string, funcs []finder.FunctionToCall, inputDir string, outputDir string) error
GenerateForBundleMode creates an output script when mode=bundle, transforming templ files to HTML.
func GenerateForInlineMode ¶ added in v1.1.0
func GenerateForInlineMode(outputScriptPath string, imports []string, funcs []finder.FunctionToCall, outputPath string) error
GenerateForInlineMode creates an output script when mode=inline, transforming templ files to HTML in their respective directories.
func RunTemplFmt ¶
RunTemplFmt runs the templ fmt command to format templ files.
func RunTemplGenerate ¶
func RunTemplGenerate(done chan<- struct{}) error
RunTemplGenerate runs the templ generate command to generate Go code from templ files.
Types ¶
type InputData ¶
type InputData struct { Imports []string FilesToGenerate []StringedData }
InputData holds the data required by the output script template.
type StringedData ¶
StringedData represents the necessary information for generating an HTML file from a templ function.
Click to show internal directories.
Click to hide internal directories.