From 89bde324279114b5510643b1355e3408018e737b Mon Sep 17 00:00:00 2001 From: Jordan Knott Date: Sun, 19 Jul 2020 13:28:02 -0500 Subject: [PATCH] fix: create internal/frontend dir if not exists during build fixes issue #5 --- magefile.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/magefile.go b/magefile.go index 2b6cf9f..5feccb3 100644 --- a/magefile.go +++ b/magefile.go @@ -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",