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
352 B
Go
22 lines
352 B
Go
//go:build embedui
|
|
|
|
// Package ui embeds the MPC admin dashboard when built with `-tags embedui`.
|
|
package ui
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
)
|
|
|
|
//go:embed all:dist
|
|
var distFS embed.FS
|
|
|
|
// DistDirFS returns the embedded dist/ tree rooted at "dist".
|
|
func DistDirFS() fs.FS {
|
|
sub, err := fs.Sub(distFS, "dist")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return sub
|
|
}
|