Documentation
¶
Overview ¶
Package extensions provides the framework for registering and applying extensions to the scaffold generation process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Files embed.FS
Files contains the templates provided by scaffold extensions.
Functions ¶
Types ¶
type AwsSes ¶
type AwsSes struct{}
AwsSes adds AWS SES email client support to a scaffolded project.
func (AwsSes) Dependencies ¶
Dependencies returns extension names that must be applied first.
type Context ¶
type Context struct {
TargetDir string
Data TemplateData
ProcessTemplate ProcessTemplateFunc
AddPostStep func(func(targetDir string) error)
NextMigrationTime *time.Time
Inertia string // inertia adapter, e.g. "vue", "react"
}
Context carries state and callbacks for applying an extension.
type CssComponents ¶ added in v1.0.0
type CssComponents struct{}
CssComponents adds optional CSS component examples to a scaffolded project.
func (CssComponents) Apply ¶ added in v1.0.0
func (c CssComponents) Apply(ctx *Context) error
Apply renders component CSS and example templates.
func (CssComponents) Dependencies ¶ added in v1.0.0
func (c CssComponents) Dependencies() []string
Dependencies returns extension names that must be applied first.
func (CssComponents) Name ¶ added in v1.0.0
func (c CssComponents) Name() string
Name returns the extension name used in lock files and CLI flags.
type Docker ¶
type Docker struct{}
Docker adds Docker build files to a scaffolded project.
func (Docker) Dependencies ¶
Dependencies returns extension names that must be applied first.
type ProcessTemplateFunc ¶
type ProcessTemplateFunc func(templateFile, targetPath string, data TemplateData) error
ProcessTemplateFunc renders an extension template into a target file.