fix(nebula): use bunx for tailwindcss build

This commit is contained in:
Prad Nukala
2024-09-25 22:47:00 -04:00
parent ad2902b0bb
commit 3638acd216
15 changed files with 95 additions and 312 deletions
+2 -15
View File
@@ -2,7 +2,6 @@ package nebula
import (
"embed"
"io/fs"
"net/http"
"os"
@@ -12,20 +11,8 @@ import (
//go:embed assets
var embeddedFiles embed.FS
func getFileSystem(useOS bool) http.FileSystem {
if useOS {
return http.FS(os.DirFS("assets"))
}
fsys, err := fs.Sub(embeddedFiles, "assets")
if err != nil {
panic(err)
}
return http.FS(fsys)
}
func UseAssets(e *echo.Echo) echo.HandlerFunc {
assets := http.FileServer(getFileSystem(true))
embFs := http.FS(os.DirFS("assets"))
assets := http.FileServer(embFs)
return echo.WrapHandler(assets)
}