Documentation
¶
Index ¶
- func Build(entry string, opt api.BuildOptions) ([]byte, error)
- func BuildFS(fs fs.FS, entry string, opt api.BuildOptions) ([]byte, error)
- func Bundle(entry string, o api.BuildOptions) ([]byte, error)
- func BundleFS(fs fs.FS, entry string, o api.BuildOptions) ([]byte, error)
- func Transform(path string, o api.BuildOptions) ([]byte, error)
- func TransformBytes(content []byte, o api.BuildOptions) ([]byte, error)
- func TransformBytesTS(content []byte, o api.BuildOptions) ([]byte, error)
- type BaseProfile
- type BuildErrors
- type BuildProfiles
- type HTMLElement
- type InlineMode
- type InlineResource
- type Registry
- func (r *Registry) InlineScript(data []byte, mode InlineMode) (*InlineResource, error)
- func (r *Registry) InlineStyle(data []byte, mode InlineMode) (*InlineResource, error)
- func (rg *Registry) MainScript() *Resource
- func (rg *Registry) MainStyle() *Resource
- func (r *Registry) Module(path string, profile string) (*Resource, error)
- func (r *Registry) ModuleBundle(entry string, profile string) (*Resource, error)
- func (r *Registry) ModuleBundleFS(cacheKey string, fs fs.FS, entry string, profile string) (*Resource, error)
- func (r *Registry) ModuleBytes(content []byte, profile string) (*Resource, error)
- func (r *Registry) ModuleBytesTS(content []byte, profile string) (*Resource, error)
- func (r *Registry) ModuleRaw(path string) (*Resource, error)
- func (r *Registry) ModuleRawBytes(content []byte) (*Resource, error)
- func (rg *Registry) Serve(hash []byte, w http.ResponseWriter, r *http.Request)
- func (r *Registry) Style(path string) (*Resource, error)
- func (r *Registry) StyleBytes(content []byte) (*Resource, error)
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransformBytes ¶
func TransformBytes(content []byte, o api.BuildOptions) ([]byte, error)
func TransformBytesTS ¶
func TransformBytesTS(content []byte, o api.BuildOptions) ([]byte, error)
Types ¶
type BaseProfile ¶
type BaseProfile struct { }
func (BaseProfile) Options ¶
func (b BaseProfile) Options(profile string) api.BuildOptions
type BuildErrors ¶
func (BuildErrors) Error ¶
func (b BuildErrors) Error() string
type BuildProfiles ¶
type BuildProfiles interface {
Options(profile string) api.BuildOptions
}
type HTMLElement ¶
type HTMLElement struct { Tag string Content []byte Attrs templ.Attributes }
func HTMLParseElement ¶
func HTMLParseElement(tag string, data []byte) (*HTMLElement, error)
type InlineMode ¶
type InlineMode int
const ( InlineModeHost InlineMode = iota InlineModeLocal InlineModeNoCache )
type InlineResource ¶
type InlineResource struct { Attrs templ.Attributes // contains filtered or unexported fields }
func (*InlineResource) Content ¶
func (i *InlineResource) Content() []byte
func (*InlineResource) Resource ¶
func (i *InlineResource) Resource() *Resource
func (*InlineResource) Serve ¶
func (i *InlineResource) Serve(w http.ResponseWriter, r *http.Request)
type Registry ¶
type Registry struct { Gzip bool Profiles BuildProfiles // contains filtered or unexported fields }
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) InlineScript ¶
func (r *Registry) InlineScript(data []byte, mode InlineMode) (*InlineResource, error)
func (*Registry) InlineStyle ¶
func (r *Registry) InlineStyle(data []byte, mode InlineMode) (*InlineResource, error)
func (*Registry) MainScript ¶
func (*Registry) ModuleBundle ¶
func (*Registry) ModuleBundleFS ¶
func (*Registry) ModuleBytes ¶
func (*Registry) ModuleBytesTS ¶
func (*Registry) ModuleRawBytes ¶
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) HashString ¶
func (*Resource) ServeCache ¶
Click to show internal directories.
Click to hide internal directories.