mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
fix(nebula): use bunx for tailwindcss build
This commit is contained in:
+2
-15
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user