Documentation
¶
Overview ¶
Package build implements `gombit build --embed`: Vite production build, collectstatic into internal/web/static, and `go build` of a single binary that serves API + static + SPA fallback. Split deploy stays the default (C5); embedding is opt-in.
Index ¶
Constants ¶
View Source
const (
// DefaultOut is the server binary path when --out is omitted.
DefaultOut = "bin/server"
)
Variables ¶
View Source
var ErrEmbedRequired = errors.New("build: split deploy is the default (C5). Embedding the Vite frontend is opt-in; pass --embed to collectstatic frontend/dist into internal/web/static and compile a single binary that serves API + static + SPA fallback")
ErrEmbedRequired is returned when gombit build is invoked without --embed. Split deploy stays the default (C5).
Functions ¶
func CollectStatic ¶
CollectStatic copies srcDir (frontend/dist) into dstDir (internal/web/static), replacing previous assets but leaving .keep and never touching embed.go.
Types ¶
type CommandFunc ¶
CommandFunc starts a subprocess. Tests replace this with short-lived fakes.
type LookPathFunc ¶
LookPathFunc locates an executable. Tests replace this to simulate npm/go.
Click to show internal directories.
Click to hide internal directories.