Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendConfig ¶
type BuildConfig ¶
type ExternalTemplateConfig ¶
type ExternalTemplateConfig struct {
Source string `yaml:"source"` // GitHub URL or local path
Name string `yaml:"name"` // Template name from template.yaml
Description string `yaml:"description"` // Template description
CachedPath string `yaml:"cached_path,omitempty"` // Local cache path
}
ExternalTemplateConfig holds information about external templates
type FrontendConfig ¶
type FrontendConfig struct {
Framework string `yaml:"framework"`
InstallCmd string `yaml:"install_cmd,omitempty"` // Legacy support
DevCmd string `yaml:"dev_cmd"`
BuildCmd string `yaml:"build_cmd"`
TypesDir string `yaml:"types_dir"`
LibDir string `yaml:"lib_dir"`
StaticGen StaticGenConfig `yaml:"static_gen"`
Template TemplateConfig `yaml:"template,omitempty"` // New template configuration
}
type ProjectConfig ¶
type ProjectConfig struct {
Name string `yaml:"name"`
Port int `yaml:"port"`
Frontend FrontendConfig `yaml:"frontend"`
Backend BackendConfig `yaml:"backend"`
Build BuildConfig `yaml:"build"`
ExternalTemplate *ExternalTemplateConfig `yaml:"external_template,omitempty"`
}
func ReadConfig ¶
func ReadConfig(path string) (*ProjectConfig, error)
type StaticGenConfig ¶
type TemplateConfig ¶
type TemplateConfig struct {
Type string `yaml:"type"` // "hardcoded", "script", "custom", "remote"
Source string `yaml:"source"` // template name, script command, or URL/path
// For remote templates
URL string `yaml:"url,omitempty"` // GitHub URL or local path
Version string `yaml:"version,omitempty"` // Git tag, branch, or "latest"
Cache bool `yaml:"cache,omitempty"` // Whether to cache the template
Vars map[string]string `yaml:"vars,omitempty"` // Template variables
// For custom commands
Command string `yaml:"command,omitempty"` // Custom installation command
Dir string `yaml:"dir,omitempty"` // Working directory for command
}
TemplateConfig defines how the frontend should be generated
Click to show internal directories.
Click to hide internal directories.