Documentation
¶
Index ¶
- type Addon
- type AssetMode
- type BuildConfig
- type BuildMode
- type BuildTargetConfig
- type CSSAsset
- type CSSConfig
- type CSSContext
- type CSSOutputConfig
- type CSSProcessor
- type CSSResult
- type CSSSource
- type Config
- type Feature
- type FeatureSet
- type ModuleConfig
- type RenderConfig
- type RenderMode
- type SourceConfig
- type Stylesheet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildConfig ¶
type BuildConfig struct {
Output string
Mode BuildMode
Assets AssetMode
Stylesheets []Stylesheet
Targets []BuildTargetConfig
}
BuildConfig controls output artifacts and frontend asset packaging.
func (BuildConfig) DebugAssets ¶
func (config BuildConfig) DebugAssets() bool
DebugAssets reports whether generated frontend artifacts should include debugging metadata.
type BuildMode ¶
type BuildMode string
BuildMode controls whether generated frontend artifacts include development metadata such as source maps. Development is the default when omitted.
type BuildTargetConfig ¶
type BuildTargetConfig struct {
Name string
Modules []string
Output string
App string
Binary string
WASM string
}
BuildTargetConfig declares one static build target. Modules selects the configured source modules compiled into Output, App, Binary, and WASM.
type CSSConfig ¶
type CSSConfig struct {
Include []string
Exclude []string
Default []string
Output CSSOutputConfig
}
CSSConfig controls discovered CSS inputs and page CSS output.
type CSSContext ¶
type CSSContext struct {
Sources []CSSSource
OutputDir string
Build BuildConfig
CSS CSSConfig
}
CSSContext is passed to compile-time CSS processors.
type CSSOutputConfig ¶
CSSOutputConfig controls generated page stylesheet locations.
type CSSProcessor ¶
type CSSProcessor interface {
Addon
ProcessCSS(CSSContext) (CSSResult, error)
}
CSSProcessor is implemented by addons that emit CSS at build time.
type CSSResult ¶
type CSSResult struct {
Assets []CSSAsset
Stylesheets []Stylesheet
}
CSSResult is returned by compile-time CSS processors.
type Config ¶
type Config struct {
AppName string
Source SourceConfig
Modules []ModuleConfig
Render RenderConfig
Build BuildConfig
CSS CSSConfig
Addons []Addon
}
Config describes how a GOWDK application should be discovered, compiled, and packaged.
func (Config) HasFeature ¶
HasFeature reports whether a config enables a feature through an addon.
type Feature ¶
type Feature string
Feature names the capabilities that addons make available to the compiler.
type FeatureSet ¶
FeatureSet is a lookup table of enabled addon capabilities.
func EnabledFeatures ¶
func EnabledFeatures(config Config) FeatureSet
EnabledFeatures returns the set of capabilities enabled by a config.
func (FeatureSet) Has ¶
func (features FeatureSet) Has(feature Feature) bool
Has reports whether a feature is present in the set.
type ModuleConfig ¶
type ModuleConfig struct {
Name string
Type string
Source SourceConfig
}
ModuleConfig names a source group inside a GOWDK app. Build discovery uses selected module sources to decide what gets compiled into output, generated apps, and generated binaries. Type is user-defined metadata.
type RenderConfig ¶
type RenderConfig struct {
Default RenderMode
}
RenderConfig controls default render behavior. Static is the default when omitted.
func (RenderConfig) DefaultMode ¶
func (config RenderConfig) DefaultMode() RenderMode
DefaultMode returns Static when no explicit default render mode is set.
type RenderMode ¶
type RenderMode string
RenderMode describes where full-page HTML is produced.
const ( // Static renders full pages at build time. Static RenderMode = "static" // Action renders the page statically while allowing backend actions. Action RenderMode = "action" // Hybrid allows a route to combine static output and request-time behavior. Hybrid RenderMode = "hybrid" // SSR renders full pages at request time through the SSR addon. SSR RenderMode = "ssr" )
func ParseRenderMode ¶
func ParseRenderMode(value string) (RenderMode, error)
ParseRenderMode validates a render mode from source.
func (RenderMode) IsBuildTime ¶
func (mode RenderMode) IsBuildTime() bool
IsBuildTime reports whether route params must be known at build time.
func (RenderMode) RequiresSSR ¶
func (mode RenderMode) RequiresSSR() bool
RequiresSSR reports whether this mode needs the SSR addon.
type SourceConfig ¶
SourceConfig selects portable .gwdk files for discovery.
type Stylesheet ¶
type Stylesheet struct {
Href string
}
Stylesheet describes one stylesheet link emitted into generated HTML.
Directories
¶
| Path | Synopsis |
|---|---|
|
addons
|
|
|
css
Package css registers compile-time CSS extension support.
|
Package css registers compile-time CSS extension support. |
|
ratelimit
Package ratelimit provides HTTP rate limiting for generated or user-owned request-time handlers.
|
Package ratelimit provides HTTP rate limiting for generated or user-owned request-time handlers. |
|
tailwind
Package tailwind integrates Tailwind CSS v4 through the standalone CLI.
|
Package tailwind integrates Tailwind CSS v4 through the standalone CLI. |
|
cmd
|
|
|
gowdk
command
|
|
|
gowdk-wasm
command
|
|
|
examples
|
|
|
css
command
|
|
|
tailwind
command
|
|
|
internal
|
|
|
appgen
Package appgen emits a generated Go app that embeds static build output.
|
Package appgen emits a generated Go app that embeds static build output. |
|
clientlang
Package clientlang parses GOWDK component-local client handlers.
|
Package clientlang parses GOWDK component-local client handlers. |
|
clientrt
Package clientrt emits the tiny client runtime used for partial updates.
|
Package clientrt emits the tiny client runtime used for partial updates. |
|
codegen
Package codegen emits Go, HTML, CSS, and asset artifacts from a manifest.
|
Package codegen emits Go, HTML, CSS, and asset artifacts from a manifest. |
|
discover
Package discover finds portable .gwdk files from source include patterns.
|
Package discover finds portable .gwdk files from source include patterns. |
|
gotypes
Package gotypes resolves Go contracts referenced from .gwdk component files.
|
Package gotypes resolves Go contracts referenced from .gwdk component files. |
|
lsp
Package lsp implements the GOWDK Language Server Protocol entrypoint.
|
Package lsp implements the GOWDK Language Server Protocol entrypoint. |
|
parser
Package parser turns .gwdk source files into syntax trees.
|
Package parser turns .gwdk source files into syntax trees. |
|
project
Package project loads project-level compiler configuration.
|
Package project loads project-level compiler configuration. |
|
staticgen
Package staticgen emits static HTML artifacts for build-time pages.
|
Package staticgen emits static HTML artifacts for build-time pages. |
|
view
Package view parses and renders the first static subset of view {} markup.
|
Package view parses and renders the first static subset of view {} markup. |
|
Package playground exposes an in-memory compiler suitable for browser playgrounds and WASM wrappers.
|
Package playground exposes an in-memory compiler suitable for browser playgrounds and WASM wrappers. |
|
runtime
|
|
|
testfixture
|
|