Documentation
¶
Index ¶
- func Execute()
- func InitCommand(configPath, sourceRoot string)
- func MatchIgnore(path string, isDir bool, ignoreFolders, ignoreFiles []string, ...) bool
- func MatchInclude(path string, includePatterns []string) bool
- func RunCommand(configPath, sourceRoot, outPath string, copyConfig bool)
- func RunUI() (string, string, error)
- type CandidateVariable
- type Config
- type Hook
- type RenameRule
- type Replacement
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute runs the Bubble Tea menu and dispatches to the matching command.
func InitCommand ¶
func InitCommand(configPath, sourceRoot string)
InitCommand scans the source root, suggests ignore patterns, and writes a starter config.
func MatchIgnore ¶
func MatchIgnore(path string, isDir bool, ignoreFolders, ignoreFiles []string, scaffoldIgnorePatterns []string) bool
MatchIgnore checks if a file/folder should be ignored based on config ignore patterns and .scaffoldignore.
func MatchInclude ¶
MatchInclude returns true when a path matches an explicit include glob.
func RunCommand ¶
RunCommand scaffolds a project directly from source to output without an intermediate build step.
Types ¶
type CandidateVariable ¶
CandidateVariable represents a discovered variable in the source project for mapping to template variables.
type Config ¶
type Config struct {
SourceRoot string `json:"sourceRoot"`
TemplateRoot string `json:"templateRoot"`
Token map[string]string `json:"token"`
IgnoreFolders []string `json:"ignoreFolders"`
IgnoreFiles []string `json:"ignoreFiles"`
StaticFiles []string `json:"staticFiles"`
Variables map[string]Variable `json:"variables"`
Replacements []Replacement `json:"replacements"`
RenameRules []RenameRule `json:"renameRules"`
Hooks map[string][]Hook `json:"hooks"`
}
func LoadConfig ¶
func (*Config) ApplyVariableReplacements ¶
ApplyVariableReplacements replaces all variable tokens in a string
func (*Config) GetVariableValue ¶
GetVariableValue returns the value for a variable, using override or default if not set