wave

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnChangeStrategyPre              = ki.OnChangeStrategyPre
	OnChangeStrategyConcurrent       = ki.OnChangeStrategyConcurrent
	OnChangeStrategyConcurrentNoWait = ki.OnChangeStrategyConcurrentNoWait
	OnChangeStrategyPost             = ki.OnChangeStrategyPost
	PrehashedDirname                 = ki.PrehashedDirname
)

Variables

View Source
var (
	MustGetPort  = ki.MustGetAppPort
	GetIsDev     = ki.GetIsDev
	SetModeToDev = ki.SetModeToDev
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// Required -- the bytes of your wave.config.json file. You can
	// use go:embed or just read the file in yourself. Using go:embed
	// is recommended for simpler deployments and improved performance.
	WaveConfigJSON []byte

	// Required -- be sure to pass in a file system that has your
	// <distDir>/static directory as its ROOT. If you are using an
	// embedded filesystem, you may need to use fs.Sub to get the
	// correct subdirectory. Using go:embed is recommended for simpler
	// deployments and improved performance.
	DistStaticFS fs.FS

	// Optional -- a logger instance. If not provided, a default logger
	// will be created that writes to standard out.
	Logger *slog.Logger
}

type FileMap

type FileMap = ki.FileMap

type OnChangeCmd

type OnChangeCmd = ki.OnChangeHook

type WatchedFile

type WatchedFile = ki.WatchedFile

type Wave

type Wave struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *Wave

func (Wave) BuildWave

func (k Wave) BuildWave() error

func (Wave) BuildWaveWithHook

func (k Wave) BuildWaveWithHook(hook func(isDev bool) error)

func (Wave) BuildWaveWithoutCompilingGo

func (k Wave) BuildWaveWithoutCompilingGo() error

func (Wave) FaviconRedirect

func (k Wave) FaviconRedirect() middleware.Middleware

Forwards requests for "/favicon.ico" to "/{your-public-prefix}/favicon.ico". Not necessary if you're explicitly defining your favicon anywhere. Only comes into play if your preference is to drop a "favicon.ico" file into your public static directory and call it a day.

func (Wave) GetBaseFS

func (k Wave) GetBaseFS() (fs.FS, error)

func (Wave) GetConfigFile

func (k Wave) GetConfigFile() string

func (Wave) GetCriticalCSS

func (k Wave) GetCriticalCSS() template.CSS

func (Wave) GetCriticalCSSElementID

func (k Wave) GetCriticalCSSElementID() string

func (Wave) GetCriticalCSSStyleElement

func (k Wave) GetCriticalCSSStyleElement() template.HTML

func (Wave) GetCriticalCSSStyleElementSha256Hash

func (k Wave) GetCriticalCSSStyleElementSha256Hash() string

func (Wave) GetDistDir

func (k Wave) GetDistDir() string

func (Wave) GetIsDev

func (k Wave) GetIsDev() bool

Also add top-level funcs to Wave struct for convenience.

func (Wave) GetPrivateFS

func (k Wave) GetPrivateFS() (fs.FS, error)

func (Wave) GetPrivateStaticDir

func (k Wave) GetPrivateStaticDir() string

func (Wave) GetPublicFS

func (k Wave) GetPublicFS() (fs.FS, error)

func (Wave) GetPublicFileMap

func (k Wave) GetPublicFileMap() (FileMap, error)

func (Wave) GetPublicFileMapElements

func (k Wave) GetPublicFileMapElements() template.HTML

func (Wave) GetPublicFileMapKeysBuildtime

func (k Wave) GetPublicFileMapKeysBuildtime() ([]string, error)

func (Wave) GetPublicFileMapScriptSha256Hash

func (k Wave) GetPublicFileMapScriptSha256Hash() string

func (Wave) GetPublicFileMapURL

func (k Wave) GetPublicFileMapURL() string

func (Wave) GetPublicPathPrefix

func (k Wave) GetPublicPathPrefix() string

func (Wave) GetPublicStaticDir

func (k Wave) GetPublicStaticDir() string

func (Wave) GetPublicURL

func (k Wave) GetPublicURL(originalPublicURL string) string

func (Wave) GetRefreshScript

func (k Wave) GetRefreshScript() template.HTML

func (Wave) GetRefreshScriptSha256Hash

func (k Wave) GetRefreshScriptSha256Hash() string

func (Wave) GetServeStaticHandler

func (k Wave) GetServeStaticHandler(addImmutableCacheHeaders bool) (http.Handler, error)

func (Wave) GetSimplePublicFileMapBuildtime

func (k Wave) GetSimplePublicFileMapBuildtime() (map[string]string, error)

func (Wave) GetStaticPrivateOutDir

func (k Wave) GetStaticPrivateOutDir() string

func (Wave) GetStaticPublicOutDir

func (k Wave) GetStaticPublicOutDir() string

func (Wave) GetStyleSheetElementID

func (k Wave) GetStyleSheetElementID() string

func (Wave) GetStyleSheetLinkElement

func (k Wave) GetStyleSheetLinkElement() template.HTML

func (Wave) GetStyleSheetURL

func (k Wave) GetStyleSheetURL() string

func (Wave) GetViteManifestLocation

func (k Wave) GetViteManifestLocation() string

func (Wave) GetViteOutDir

func (k Wave) GetViteOutDir() string

func (Wave) GetVormaBuildtimePublicURLFuncName

func (k Wave) GetVormaBuildtimePublicURLFuncName() string

func (Wave) GetVormaClientEntry

func (k Wave) GetVormaClientEntry() string

func (Wave) GetVormaClientRouteDefsFile

func (k Wave) GetVormaClientRouteDefsFile() string

func (Wave) GetVormaHTMLTemplateLocation

func (k Wave) GetVormaHTMLTemplateLocation() string

func (Wave) GetVormaTSGenOutPath

func (k Wave) GetVormaTSGenOutPath() string

func (Wave) GetVormaUIVariant

func (k Wave) GetVormaUIVariant() string

func (Wave) MustGetPort

func (k Wave) MustGetPort() int

func (Wave) MustGetPrivateFS

func (k Wave) MustGetPrivateFS() fs.FS

func (Wave) MustGetPublicFS

func (k Wave) MustGetPublicFS() fs.FS

func (Wave) MustGetPublicURLBuildtime

func (k Wave) MustGetPublicURLBuildtime(originalPublicURL string) string

func (Wave) MustGetServeStaticHandler

func (k Wave) MustGetServeStaticHandler(addImmutableCacheHeaders bool) http.Handler

func (Wave) MustStartDev

func (k Wave) MustStartDev()

func (Wave) ServeStatic

func (k Wave) ServeStatic(addImmutableCacheHeaders bool) func(http.Handler) http.Handler

func (Wave) SetModeToDev

func (k Wave) SetModeToDev()

func (Wave) SetupDistDir

func (k Wave) SetupDistDir()

func (Wave) ViteProdBuildWave

func (k Wave) ViteProdBuildWave() error

Directories

Path Synopsis
internal
ki

Jump to

Keyboard shortcuts

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