Documentation
¶
Overview ¶
Package spadev exposes one helper, LiveDiskFS, that every Go tool shipping a Vite-built SPA wires into its `init()` so the dev loop (`npm run build:watch`) can serve fresh bundles without recompiling the wick binary.
Convention: every tool keeps its SPA tree at `internal/tools/<tool>/dist/<app>/`. When the env var WICK_DEV_REPO_ROOT points at the wick checkout, each tool's `spa.go` asks for `LiveDiskFS("<tool>")` and swaps its `SPAFS embed.FS` for an `os.DirFS` rooted at the tool dir. Production binaries leave the var unset and stay on the compile-time embed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LiveDiskFS ¶
LiveDiskFS returns a live filesystem view of an SPA dist tree for the named Go tool, plus a flag telling the caller whether it should disable any per-process URL caches (live mode → cache off because Vite rebuilds change the hashed bundle name).
Returns (nil, false) when the env var is unset, points at a missing path, or the tool has no dist subdir yet. Callers fall back to their compile-time embed in that case.
Types ¶
This section is empty.