Documentation
¶
Overview ¶
Package script handles parsing and discovery of site scripts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct {
Name string `json:"name"`
Description string `json:"description"`
Domain string `json:"domain"`
Args map[string]ArgDef `json:"args"`
ReadOnly bool `json:"readOnly"`
Example string `json:"example"`
}
Meta holds the metadata extracted from a script's @meta block.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry indexes scripts by their meta name.
func NewRegistry ¶
NewRegistry scans a directory for .js script files and indexes them by meta name.
func NewRegistryWithOverride ¶ added in v0.3.0
NewRegistryWithOverride is like NewRegistry but also checks localOverrideDir before the main cache dir. Scripts found there shadow the cached versions.
func (*Registry) ListLocalOnly ¶ added in v0.3.0
ListLocalOnly returns only scripts loaded from the local override directory.
Click to show internal directories.
Click to hide internal directories.