2022-06-03 04:27:21 +00:00
|
|
|
//go:build embed
|
|
|
|
// +build embed
|
|
|
|
|
|
|
|
package site
|
|
|
|
|
|
|
|
import (
|
|
|
|
"embed"
|
|
|
|
"io/fs"
|
|
|
|
)
|
|
|
|
|
2023-02-10 19:52:56 +00:00
|
|
|
//go:embed all:out
|
|
|
|
//go:embed all:out/bin/*
|
2022-06-03 04:27:21 +00:00
|
|
|
var site embed.FS
|
|
|
|
|
|
|
|
func FS() fs.FS {
|
2022-09-29 21:28:44 +00:00
|
|
|
// the out directory is where FE builds are created. It is in the same
|
2022-06-03 04:27:21 +00:00
|
|
|
// directory as this file (package site).
|
|
|
|
out, err := fs.Sub(site, "out")
|
|
|
|
if err != nil {
|
|
|
|
// This can't happen... Go would throw a compilation error.
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
return out
|
|
|
|
}
|