Documentation
¶
Index ¶
- type ComponentCompiler
- func (c *ComponentCompiler) ClearCache()
- func (c *ComponentCompiler) Compile(filePath string, props map[string]interface{}, slots map[string]string) (string, error)
- func (c *ComponentCompiler) CompileWithContext(filePath string, props map[string]interface{}, slots map[string]string, ...) (string, error)
- func (c *ComponentCompiler) ProcessComponentTags(template string, ctx *executor.Context) string
- func (c *ComponentCompiler) ResetComponentTracking()
- func (c *ComponentCompiler) SetResolver(resolver *ComponentResolver)
- type ComponentResolver
- type Import
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentCompiler ¶
type ComponentCompiler struct {
BaseDir string
Cache map[string]*parser.Component
Bundler *assets.Bundler
Resolver *ComponentResolver
CollectedStyles []parser.Style
UsedComponents []string
// contains filtered or unexported fields
}
func NewComponentCompiler ¶
func NewComponentCompiler(baseDir string) *ComponentCompiler
func (*ComponentCompiler) ClearCache ¶
func (c *ComponentCompiler) ClearCache()
func (*ComponentCompiler) CompileWithContext ¶
func (*ComponentCompiler) ProcessComponentTags ¶
func (c *ComponentCompiler) ProcessComponentTags(template string, ctx *executor.Context) string
func (*ComponentCompiler) ResetComponentTracking ¶
func (c *ComponentCompiler) ResetComponentTracking()
func (*ComponentCompiler) SetResolver ¶
func (c *ComponentCompiler) SetResolver(resolver *ComponentResolver)
type ComponentResolver ¶
type ComponentResolver struct {
BaseDir string
ComponentDirs []string
CurrentFile string
ExplicitPaths map[string]string
Cache map[string]string
ComponentIndex map[string]string
}
func NewComponentResolver ¶
func NewComponentResolver(baseDir string, componentDirs []string) *ComponentResolver
func (*ComponentResolver) ExtractComponentRefs ¶
func (r *ComponentResolver) ExtractComponentRefs(template string) []string
func (*ComponentResolver) ParseImports ¶
func (r *ComponentResolver) ParseImports(imports []Import)
func (*ComponentResolver) Resolve ¶
func (r *ComponentResolver) Resolve(name string) (string, error)
func (*ComponentResolver) SetCurrentFile ¶
func (r *ComponentResolver) SetCurrentFile(file string)
Click to show internal directories.
Click to hide internal directories.