mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
CI lint was failing because ui/dist/ doesn't exist in a clean checkout. Default build compiles with no embedded assets. Production builds that want the bundled dashboard must build with -tags embedui after `pnpm --dir ui build`.
22 lines
597 B
Go
22 lines
597 B
Go
//go:build !embedui
|
|
|
|
// Package ui provides a placeholder dashboard filesystem when the
|
|
// server is built without the `embedui` tag. Default build ships no UI.
|
|
// Production builds that want the bundled dashboard must
|
|
// `pnpm --dir ui build` then build with `-tags embedui`.
|
|
package ui
|
|
|
|
import (
|
|
"io/fs"
|
|
"testing/fstest"
|
|
)
|
|
|
|
var emptyFS = fstest.MapFS{
|
|
"index.html": &fstest.MapFile{Data: []byte(
|
|
`<!doctype html><title>MPC</title><p>UI not embedded. Build with -tags embedui.</p>`,
|
|
)},
|
|
}
|
|
|
|
// DistDirFS returns an empty placeholder dashboard tree.
|
|
func DistDirFS() fs.FS { return emptyFS }
|