diff options
Diffstat (limited to 'pack_webui.go')
-rw-r--r-- | pack_webui.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pack_webui.go b/pack_webui.go new file mode 100644 index 00000000..845b150b --- /dev/null +++ b/pack_webui.go @@ -0,0 +1,29 @@ +// +build ignore + +package main + +import ( + "log" + "net/http" + "os" + "path/filepath" + + "github.com/shurcooL/vfsgen" +) + +func main() { + var cwd, _ = os.Getwd() + + webUIAssets := http.Dir(filepath.Join(cwd, "webui/build")) + + err := vfsgen.Generate(webUIAssets, vfsgen.Options{ + Filename: "webui/packed_assets.go", + PackageName: "webui", + BuildTags: "deploy_build", + VariableName: "WebUIAssets", + }) + + if err != nil { + log.Fatalln(err) + } +} |