fix: create internal/frontend dir if not exists during build
fixes issue #5
This commit is contained in:
parent
66a2931ab8
commit
89bde32427
@ -32,6 +32,9 @@ func (Frontend) Build() error {
|
||||
type Backend mg.Namespace
|
||||
|
||||
func (Backend) GenFrontend() error {
|
||||
if _, err := os.Stat("internal/frontend/"); os.IsNotExist(err) {
|
||||
os.Mkdir("internal/frontend/", 0755)
|
||||
}
|
||||
var fs http.FileSystem = http.Dir("frontend/build")
|
||||
err := vfsgen.Generate(fs, vfsgen.Options{
|
||||
Filename: "internal/frontend/frontend_generated.go",
|
||||
|
Loading…
Reference in New Issue
Block a user