compile

package
v0.0.0-...-af76324 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Copyright (C) 2024 early (LGPL)

Copyright (C) 2024 early (LGPL)

Copyright (C) 2024 early (LGPL)

Copyright (C) 2024 early (LGPL)

Index

Constants

This section is empty.

Variables

View Source
var ErrBadComponentFormat = errors.New("web components must either be a script or a template and script")

Functions

This section is empty.

Types

type Result

type Result struct {
	TemplateRaw        string
	TemplateFuncs      template.FuncMap
	TemplateDataLoader render.Loader
}

func Compile

func Compile(root TemplateSource, transform ...func(root *html.Node)) (Result, error)

type Source

type Source interface {
	Name() string
	Source() include.Opener
	Includes() []Source
}

type Sources

type Sources map[string]Source

type TemplateSource

type TemplateSource interface {
	Source
	IncludeTagName() bool
	TemplateFuncs() template.FuncMap
	OnLoad() render.OnLoadFunc
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL