wave

package
v0.85.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Overview

Package wave provides runtime services that may be linked into production binaries.

Build-time and dev-time functionality is in the wave/tooling subpackage. Keeping this split explicit lets applications use runtime-only code in production while avoiding build-tool dependencies in shipped binaries.

Index

Constants

View Source
const (
	PrehashedDirname = "prehashed"
	NohashDirname    = "__nohash"

	HashedOutputPrefix           = "vorma_out_"
	HashedOutputPrefixNoTrailing = "vorma_out"

	NormalCSSBaseName    = "vorma_internal_normal.css"
	NormalCSSGlobPattern = HashedOutputPrefix + "vorma_internal_normal_*.css"

	GeneratedTSFileName   = "index.ts"
	PublicFileMapTSName   = "filemap.ts"
	PublicFileMapJSONName = "filemap.json"
	FileMapJSGlobPattern  = HashedOutputPrefix + "vorma_internal_public_filemap_*.js"
)

Public constants

View Source
const (
	DefaultBrowserRuntimeNamespace              = "__wave"
	DefaultBrowserPublicURLResolverFunctionName = "getPublicURL"
	DefaultBrowserRevalidateFunctionName        = "__waveRevalidate"
	DefaultRefreshRebuildingOverlayElementID    = "wave-refreshscript-rebuilding"
	DefaultCriticalCSSStyleElementID            = "wave-critical-css"
	DefaultNonCriticalCSSLinkElementID          = "wave-normal-css"
)

Runtime browser integration defaults.

View Source
const (
	CriticalCSSElementID = DefaultCriticalCSSStyleElementID
	StyleSheetElementID  = DefaultNonCriticalCSSLinkElementID
)

Variables

View Source
var RelPaths = relPaths{}

RelPaths provides fs.FS-relative paths (no leading slash, forward slashes).

Functions

func GetIsDev

func GetIsDev() bool

func GetPort

func GetPort() int

func GetRefreshServerPort

func GetRefreshServerPort() int

func MustGetPort

func MustGetPort() int

MustGetPort returns the application port. In dev mode, finds a free port if needed.

func RefreshScriptInner

func RefreshScriptInner(port int) string

RefreshScriptInner returns the raw JavaScript for the refresh script. Exported so devserver can serve it via HTTP endpoint.

func RefreshScriptInnerWithParsedConfig

func RefreshScriptInnerWithParsedConfig(port int, parsedConfig *ParsedConfig) string

RefreshScriptInnerWithParsedConfig returns the raw JavaScript for the refresh script, resolving runtime browser integration names from ParsedConfig.

func SetModeToDev

func SetModeToDev()

func SetPort

func SetPort(port int)

func SetRefreshServerPort

func SetRefreshServerPort(port int)

Types

type CSSEntryFiles

type CSSEntryFiles struct {
	Critical    string `json:"Critical,omitempty"`
	NonCritical string `json:"NonCritical,omitempty"`
}

type Config

type Config struct {
	// Required -- Raw Wave configuration JSON.
	// This is the single app-facing configuration input path.
	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
}

Config configures Wave initialization.

type CoreConfig

type CoreConfig struct {
	ConfigLocation                   string          `json:"ConfigLocation,omitempty"`
	DevBuildHook                     string          `json:"DevBuildHook,omitempty"`
	DevBuildHookTimeoutMilliseconds  int             `json:"DevBuildHookTimeoutMilliseconds,omitempty"`
	ProdBuildHook                    string          `json:"ProdBuildHook,omitempty"`
	ProdBuildHookTimeoutMilliseconds int             `json:"ProdBuildHookTimeoutMilliseconds,omitempty"`
	MainAppEntry                     string          `json:"MainAppEntry"`
	DistDir                          string          `json:"DistDir"`
	StaticAssetDirs                  StaticAssetDirs `json:"StaticAssetDirs"`
	CSSEntryFiles                    CSSEntryFiles   `json:"CSSEntryFiles,omitempty"`
	PublicPathPrefix                 string          `json:"PublicPathPrefix,omitempty"`
	ServerOnlyMode                   bool            `json:"ServerOnlyMode,omitempty"`
	SequentialGoBuild                bool            `json:"SequentialGoBuild,omitempty"`
}

type DistLayout

type DistLayout struct {
	Root string
}

DistLayout provides computed paths for the dist directory structure.

func (DistLayout) Binary

func (d DistLayout) Binary() string

func (DistLayout) CriticalCSS

func (d DistLayout) CriticalCSS() string

func (DistLayout) Internal

func (d DistLayout) Internal() string

func (DistLayout) KeepFile

func (d DistLayout) KeepFile() string

func (DistLayout) NormalCSSRef

func (d DistLayout) NormalCSSRef() string

func (DistLayout) PrivateFileMapGob

func (d DistLayout) PrivateFileMapGob() string

func (DistLayout) PublicFileMapGob

func (d DistLayout) PublicFileMapGob() string

func (DistLayout) PublicFileMapRef

func (d DistLayout) PublicFileMapRef() string

func (DistLayout) Static

func (d DistLayout) Static() string

func (DistLayout) StaticAssets

func (d DistLayout) StaticAssets() string

func (DistLayout) StaticPrivate

func (d DistLayout) StaticPrivate() string

func (DistLayout) StaticPublic

func (d DistLayout) StaticPublic() string

type FileMap

type FileMap map[string]FileVal

func (FileMap) Lookup

func (fileMap FileMap) Lookup(original string, prefix string) (url string, found bool)

type FileVal

type FileVal struct {
	DistName    string
	ContentHash string
	IsPrehashed bool
}

type GoBuildOverlay

type GoBuildOverlay struct {
	OverlayConfigPath string
	Cleanup           func() error
}

type HookCallbackTimeoutConfig

type HookCallbackTimeoutConfig struct {
	PreCallbackTimeoutMilliseconds              int `json:"PreCallbackTimeoutMilliseconds,omitempty"`
	ConcurrentCallbackTimeoutMilliseconds       int `json:"ConcurrentCallbackTimeoutMilliseconds,omitempty"`
	ConcurrentNoWaitCallbackTimeoutMilliseconds int `json:"ConcurrentNoWaitCallbackTimeoutMilliseconds,omitempty"`
	PostCallbackTimeoutMilliseconds             int `json:"PostCallbackTimeoutMilliseconds,omitempty"`
}

type HookCommandTimeoutConfig

type HookCommandTimeoutConfig struct {
	PreCommandTimeoutMilliseconds              int `json:"PreCommandTimeoutMilliseconds,omitempty"`
	ConcurrentCommandTimeoutMilliseconds       int `json:"ConcurrentCommandTimeoutMilliseconds,omitempty"`
	ConcurrentNoWaitCommandTimeoutMilliseconds int `json:"ConcurrentNoWaitCommandTimeoutMilliseconds,omitempty"`
	PostCommandTimeoutMilliseconds             int `json:"PostCommandTimeoutMilliseconds,omitempty"`
}

type HookContext

type HookContext struct {
	// ExecutionContext is canceled when the surrounding execution pipeline is
	// canceled (for example, concurrent stage cancellation after build failure).
	// Callback hooks can watch this context for cooperative cancellation.
	ExecutionContext context.Context
	// FilePath is the absolute path of the changed file.
	FilePath string
	// ChangedFilePaths contains all changed file paths associated with the hook
	// execution context. For deduped pattern hook execution, this includes all
	// files in the matched batch.
	ChangedFilePaths []string
	// AppStoppedForBatch is true when the app has been stopped as part of batch
	// processing (e.g., a Go file changed in the same batch). When true, HTTP
	// endpoints on the running app cannot be called.
	AppStoppedForBatch bool
}

HookContext provides context to callbacks during file change handling.

type OnChangeHook

type OnChangeHook struct {
	// Cmd is a shell command to run.
	Cmd string `json:"Cmd,omitempty"`
	// CommandTimeoutMilliseconds overrides stage-level command timeout for this hook when > 0.
	CommandTimeoutMilliseconds int `json:"CommandTimeoutMilliseconds,omitempty"`
	// DisableStageCommandTimeout disables stage-level command timeout for this hook.
	DisableStageCommandTimeout bool `json:"DisableStageCommandTimeout,omitempty"`
	// CallbackTimeoutMilliseconds overrides stage-level callback timeout for this hook when > 0.
	CallbackTimeoutMilliseconds int `json:"CallbackTimeoutMilliseconds,omitempty"`
	// DisableStageCallbackTimeout disables stage-level callback timeout for this hook.
	DisableStageCallbackTimeout bool `json:"DisableStageCallbackTimeout,omitempty"`
	// RunCombinedDevBuildHookCommands executes the configured development build
	// hooks in order (Core.DevBuildHook then framework dev build hook).
	RunCombinedDevBuildHookCommands bool `json:"RunCombinedDevBuildHookCommands,omitempty"`
	// Timing controls when the hook runs relative to Wave's rebuild process.
	Timing Timing `json:"Timing,omitempty"`
	// Exclude contains glob patterns for files to exclude from triggering this hook.
	Exclude []string `json:"Exclude,omitempty"`
	// Callback is a Go function to run. Framework use only (not JSON-configurable).
	// If the callback returns a non-nil RefreshAction, it controls what Wave does
	// after all hooks complete. Multiple RefreshActions are merged with OR semantics.
	Callback func(*HookContext) (*RefreshAction, error) `json:"-"`
}

OnChangeHook defines an action to run when a watched file changes.

type ParsedConfig

type ParsedConfig struct {
	Core  *CoreConfig  `json:"Core"`
	Vite  *ViteConfig  `json:"Vite,omitempty"`
	Watch *WatchConfig `json:"Watch,omitempty"`

	Dist DistLayout `json:"-"`

	FrameworkWatchPatterns         []WatchedFile                     `json:"-"`
	FrameworkIgnoredPatterns       []string                          `json:"-"`
	FrameworkPublicFileMapOutDir   string                            `json:"-"`
	FrameworkSchemaExtensions      map[string]jsonschema.Entry       `json:"-"`
	FrameworkDevBuildHook          string                            `json:"-"`
	FrameworkProdBuildHook         string                            `json:"-"`
	FrameworkRunBuildHook          func(context.Context, bool) error `json:"-"`
	FrameworkPrepareGoBuildOverlay func() (*GoBuildOverlay, error)   `json:"-"`

	FrameworkBrowserRuntimeNamespace              string `json:"-"`
	FrameworkBrowserPublicURLResolverFunctionName string `json:"-"`
	FrameworkBrowserRevalidateFunctionName        string `json:"-"`
	FrameworkRefreshRebuildingOverlayElementID    string `json:"-"`
	FrameworkCriticalCSSStyleElementID            string `json:"-"`
	FrameworkNonCriticalCSSLinkElementID          string `json:"-"`
}

ParsedConfig is the parsed and validated Wave configuration payload.

func ParseConfig

func ParseConfig(data []byte) (*ParsedConfig, error)

ParseConfig parses Wave config JSON bytes into a ParsedConfig. This performs minimal validation to prevent nil pointer panics during parsing. Full validation of required fields should be done at build time via tooling.ValidateConfig.

func ParseConfigFile

func ParseConfigFile(path string) (*ParsedConfig, error)

ParseConfigFile reads and parses a config file.

func (*ParsedConfig) BrowserPublicURLResolverFunctionName

func (parsedConfig *ParsedConfig) BrowserPublicURLResolverFunctionName() string

func (*ParsedConfig) BrowserRevalidateFunctionName

func (parsedConfig *ParsedConfig) BrowserRevalidateFunctionName() string

func (*ParsedConfig) BrowserRuntimeNamespace

func (parsedConfig *ParsedConfig) BrowserRuntimeNamespace() string

func (*ParsedConfig) Clone

func (parsedConfig *ParsedConfig) Clone() *ParsedConfig

Clone returns a defensive public snapshot of parsed config values. Internal framework-only mutable fields are intentionally omitted.

func (*ParsedConfig) CopyFrameworkRuntimeFieldsFrom

func (cfg *ParsedConfig) CopyFrameworkRuntimeFieldsFrom(
	previousParsedConfig *ParsedConfig,
)

func (*ParsedConfig) CriticalCSSEntry

func (parsedConfig *ParsedConfig) CriticalCSSEntry() string

func (*ParsedConfig) CriticalCSSStyleElementID

func (parsedConfig *ParsedConfig) CriticalCSSStyleElementID() string

func (*ParsedConfig) HealthcheckEndpoint

func (parsedConfig *ParsedConfig) HealthcheckEndpoint() string

func (*ParsedConfig) NonCriticalCSSEntry

func (parsedConfig *ParsedConfig) NonCriticalCSSEntry() string

func (*ParsedConfig) NonCriticalCSSLinkElementID

func (parsedConfig *ParsedConfig) NonCriticalCSSLinkElementID() string

func (*ParsedConfig) PublicPathPrefix

func (parsedConfig *ParsedConfig) PublicPathPrefix() string

func (*ParsedConfig) RefreshRebuildingOverlayElementID

func (parsedConfig *ParsedConfig) RefreshRebuildingOverlayElementID() string

func (*ParsedConfig) UsingBrowser

func (parsedConfig *ParsedConfig) UsingBrowser() bool

func (*ParsedConfig) UsingVite

func (parsedConfig *ParsedConfig) UsingVite() bool

func (*ParsedConfig) ViteManifestPath

func (parsedConfig *ParsedConfig) ViteManifestPath() string

func (*ParsedConfig) WatchRoot

func (parsedConfig *ParsedConfig) WatchRoot() string

type PortResolver

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

func NewPortResolver

func NewPortResolver() *PortResolver

func (*PortResolver) MustGetPort

func (resolver *PortResolver) MustGetPort() int

MustGetPort returns a cached application port scoped to this resolver. In dev mode, finds a free port if needed.

type RefreshAction

type RefreshAction struct {
	// ReloadBrowser triggers a browser reload via WebSocket.
	// Ignored if TriggerRestart is true.
	ReloadBrowser bool
	// WaitForApp polls the app's healthcheck before reloading the browser.
	// Ignored if TriggerRestart is true.
	WaitForApp bool
	// WaitForVite waits for Vite dev server to be ready before reloading.
	// Ignored if TriggerRestart is true.
	WaitForVite bool
	// TriggerRestart causes Wave to restart the app process.
	// When true, ReloadBrowser/WaitForApp/WaitForVite are ignored.
	TriggerRestart bool
	// RecompileGo recompiles the Go binary before restart.
	// Only relevant when TriggerRestart is true.
	RecompileGo bool
}

RefreshAction specifies what Wave should do after a callback completes. Multiple RefreshActions from different hooks are merged with OR semantics.

func (RefreshAction) IsZero

func (refreshAction RefreshAction) IsZero() bool

IsZero returns true if this RefreshAction specifies no action.

func (RefreshAction) Merge

func (refreshAction RefreshAction) Merge(other RefreshAction) RefreshAction

Merge combines two RefreshActions with OR semantics. TriggerRestart takes precedence over browser reload.

type SortedHooks

type SortedHooks struct {
	Pre              []OnChangeHook
	Concurrent       []OnChangeHook
	ConcurrentNoWait []OnChangeHook
	Post             []OnChangeHook
}

type StaticAssetDirs

type StaticAssetDirs struct {
	Private string `json:"Private"`
	Public  string `json:"Public"`
}

type Timing

type Timing string

Timing represents when an OnChangeHook runs relative to Wave's rebuild process

const (
	// Blocks build, use when build depends on hook output (e.g., code generation)
	OnChangeStrategyPre Timing = "pre"
	// Blocks reload, use when hook depends on build output (e.g., something that reads compiled artifacts)
	OnChangeStrategyPost Timing = "post"
	// Runs during build, blocks reload, saves time when hook and build are independent
	OnChangeStrategyConcurrent Timing = "concurrent"
	// Fire-and-forget, blocks nothing
	OnChangeStrategyConcurrentNoWait Timing = "concurrent-no-wait"
)

type ViteConfig

type ViteConfig struct {
	JSPackageManagerBaseCmd string `json:"JSPackageManagerBaseCmd"`
	JSPackageManagerCmdDir  string `json:"JSPackageManagerCmdDir,omitempty"`
	DefaultPort             int    `json:"DefaultPort,omitempty"`
	ViteConfigFile          string `json:"ViteConfigFile,omitempty"`
}

type WatchConfig

type WatchConfig struct {
	WatchRoot            string                    `json:"WatchRoot,omitempty"`
	HealthcheckEndpoint  string                    `json:"HealthcheckEndpoint,omitempty"`
	HookCommandTimeouts  HookCommandTimeoutConfig  `json:"HookCommandTimeouts,omitempty"`
	HookCallbackTimeouts HookCallbackTimeoutConfig `json:"HookCallbackTimeouts,omitempty"`
	Include              []WatchedFile             `json:"Include,omitempty"`
	Exclude              struct {
		Dirs  []string `json:"Dirs,omitempty"`
		Files []string `json:"Files,omitempty"`
	} `json:"Exclude,omitempty"`
}

type WatchedFile

type WatchedFile struct {
	Pattern                            string         `json:"Pattern"`
	OnChangeHooks                      []OnChangeHook `json:"OnChangeHooks,omitempty"`
	RecompileGoBinary                  bool           `json:"RecompileGoBinary,omitempty"`
	RestartApp                         bool           `json:"RestartApp,omitempty"`
	OnlyRunClientDefinedRevalidateFunc bool           `json:"OnlyRunClientDefinedRevalidateFunc,omitempty"`
	RunOnChangeOnly                    bool           `json:"RunOnChangeOnly,omitempty"`
	SkipRebuildingNotification         bool           `json:"SkipRebuildingNotification,omitempty"`
	TreatAsNonGo                       bool           `json:"TreatAsNonGo,omitempty"`
	SortedHooks                        *SortedHooks   `json:"-"`
}

func (*WatchedFile) Sort

func (wf *WatchedFile) Sort()

type Wave

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

Wave provides runtime services for Wave applications.

func New

func New(c Config) *Wave

func (*Wave) AddFrameworkWatchPatterns

func (w *Wave) AddFrameworkWatchPatterns(patterns []WatchedFile)

AddFrameworkWatchPatterns adds watch patterns for use during development.

func (*Wave) AddIgnoredPatterns

func (w *Wave) AddIgnoredPatterns(patterns []string)

AddIgnoredPatterns adds glob patterns for files/directories to ignore during watching.

func (*Wave) FaviconRedirect

func (w *Wave) FaviconRedirect() middleware.Middleware

func (*Wave) GetBaseFS

func (w *Wave) GetBaseFS() (fs.FS, error)

func (*Wave) GetBuildtimeParsedConfig

func (w *Wave) GetBuildtimeParsedConfig() *ParsedConfig

GetBuildtimeParsedConfig returns a defensive parsed-config snapshot for build/dev tooling. Unlike GetParsedConfig, this includes framework build callbacks and schema extensions.

func (*Wave) GetConfigFile

func (w *Wave) GetConfigFile() string

func (*Wave) GetCriticalCSS

func (w *Wave) GetCriticalCSS() template.CSS

func (*Wave) GetCriticalCSSElementID

func (w *Wave) GetCriticalCSSElementID() string

func (*Wave) GetCriticalCSSStyleElement

func (w *Wave) GetCriticalCSSStyleElement() template.HTML

func (*Wave) GetCriticalCSSStyleElementSha256Hash

func (w *Wave) GetCriticalCSSStyleElementSha256Hash() string

func (*Wave) GetDistDir

func (w *Wave) GetDistDir() string

func (*Wave) GetIsDev

func (w *Wave) GetIsDev() bool

GetIsDev returns true if running in development mode.

func (*Wave) GetParsedConfig

func (w *Wave) GetParsedConfig() *ParsedConfig

GetParsedConfig returns the parsed configuration for use by tooling. This should only be used by build-time tooling, not at runtime. The returned value is a defensive snapshot and omits unstable internal-only runtime callback/schema fields.

func (*Wave) GetPrivateFS

func (w *Wave) GetPrivateFS() (fs.FS, error)

func (*Wave) GetPrivateStaticDir

func (w *Wave) GetPrivateStaticDir() string

func (*Wave) GetPublicFS

func (w *Wave) GetPublicFS() (fs.FS, error)

func (*Wave) GetPublicFileMap

func (w *Wave) GetPublicFileMap() (FileMap, error)

func (*Wave) GetPublicFileMapElements

func (w *Wave) GetPublicFileMapElements() template.HTML

func (*Wave) GetPublicFileMapScriptSha256Hash

func (w *Wave) GetPublicFileMapScriptSha256Hash() string

func (*Wave) GetPublicFileMapURL

func (w *Wave) GetPublicFileMapURL() string

func (*Wave) GetPublicPathPrefix

func (w *Wave) GetPublicPathPrefix() string

func (*Wave) GetPublicStaticDir

func (w *Wave) GetPublicStaticDir() string

func (*Wave) GetPublicURL

func (w *Wave) GetPublicURL(original string) string

func (*Wave) GetRefreshScript

func (w *Wave) GetRefreshScript() template.HTML

func (*Wave) GetRefreshScriptSha256Hash

func (w *Wave) GetRefreshScriptSha256Hash() string

func (*Wave) GetServeStaticHandler

func (w *Wave) GetServeStaticHandler(immutable bool) (http.Handler, error)

func (*Wave) GetStaticPrivateOutDir

func (w *Wave) GetStaticPrivateOutDir() string

func (*Wave) GetStaticPublicOutDir

func (w *Wave) GetStaticPublicOutDir() string

func (*Wave) GetStyleSheetElementID

func (w *Wave) GetStyleSheetElementID() string

func (*Wave) GetStyleSheetLinkElement

func (w *Wave) GetStyleSheetLinkElement() template.HTML

func (*Wave) GetStyleSheetURL

func (w *Wave) GetStyleSheetURL() string

func (*Wave) GetViteManifestLocation

func (w *Wave) GetViteManifestLocation() string

func (*Wave) GetViteOutDir

func (w *Wave) GetViteOutDir() string

func (*Wave) IsPublicAsset

func (w *Wave) IsPublicAsset(urlPath string) bool

func (*Wave) Logger

func (w *Wave) Logger() *slog.Logger

func (*Wave) MustGetPort

func (w *Wave) MustGetPort() int

MustGetPort returns the application port.

func (*Wave) MustGetPrivateFS

func (w *Wave) MustGetPrivateFS() fs.FS

func (*Wave) MustGetPublicFS

func (w *Wave) MustGetPublicFS() fs.FS

func (*Wave) MustGetServeStaticHandler

func (w *Wave) MustGetServeStaticHandler(immutable bool) http.Handler

func (*Wave) RawConfigJSON

func (w *Wave) RawConfigJSON() []byte

RawConfigJSON returns the raw bytes of the configuration file.

func (*Wave) RegisterFrameworkSchemaSection

func (w *Wave) RegisterFrameworkSchemaSection(
	name string,
	schema jsonschema.Entry,
)

RegisterFrameworkSchemaSection registers a framework-owned schema extension for wave.config.json generation at build time.

func (*Wave) ServeStatic

func (w *Wave) ServeStatic(immutable bool) func(http.Handler) http.Handler

func (*Wave) SetBrowserPublicURLResolverFunctionName

func (w *Wave) SetBrowserPublicURLResolverFunctionName(functionName string)

func (*Wave) SetBrowserRevalidateFunctionName

func (w *Wave) SetBrowserRevalidateFunctionName(functionName string)

func (*Wave) SetBrowserRuntimeNamespace

func (w *Wave) SetBrowserRuntimeNamespace(namespace string)

func (*Wave) SetCriticalCSSStyleElementID

func (w *Wave) SetCriticalCSSStyleElementID(elementID string)

func (*Wave) SetFrameworkDevBuildHookCommand

func (w *Wave) SetFrameworkDevBuildHookCommand(command string)

SetFrameworkDevBuildHookCommand sets the framework dev build hook command.

func (*Wave) SetFrameworkPrepareGoBuildOverlay

func (w *Wave) SetFrameworkPrepareGoBuildOverlay(
	preparer func() (*GoBuildOverlay, error),
)

SetFrameworkPrepareGoBuildOverlay sets the framework Go build overlay callback.

func (*Wave) SetFrameworkProdBuildHookCommand

func (w *Wave) SetFrameworkProdBuildHookCommand(command string)

SetFrameworkProdBuildHookCommand sets the framework production build hook command.

func (*Wave) SetFrameworkRunBuildHookRunner

func (w *Wave) SetFrameworkRunBuildHookRunner(
	runner func(context.Context, bool) error,
)

SetFrameworkRunBuildHookRunner sets the framework build hook runner callback.

func (*Wave) SetModeToDev

func (w *Wave) SetModeToDev()

SetModeToDev sets the environment to development mode.

func (*Wave) SetNonCriticalCSSLinkElementID

func (w *Wave) SetNonCriticalCSSLinkElementID(elementID string)

func (*Wave) SetPortResolver

func (w *Wave) SetPortResolver(portResolver *PortResolver)

func (*Wave) SetPublicFileMapOutDir

func (w *Wave) SetPublicFileMapOutDir(dir string)

SetPublicFileMapOutDir sets the directory where Wave should write the public filemap TypeScript file.

func (*Wave) SetRefreshRebuildingOverlayElementID

func (w *Wave) SetRefreshRebuildingOverlayElementID(elementID string)

Directories

Path Synopsis
internal
Package tooling provides build-time and dev-time functionality for Wave.
Package tooling provides build-time and dev-time functionality for Wave.

Jump to

Keyboard shortcuts

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