From 3bbb49e74b8eab7714c2df1162d086f6d731e1e8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 10 May 2024 23:05:24 +0200 Subject: build: optionally embed frontend files --- frontend/dev.go | 9 +++++++++ frontend/embedded.go | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 frontend/dev.go create mode 100644 frontend/embedded.go (limited to 'frontend') diff --git a/frontend/dev.go b/frontend/dev.go new file mode 100644 index 0000000..6cde8a5 --- /dev/null +++ b/frontend/dev.go @@ -0,0 +1,9 @@ +//go:build !embed + +package frontend + +import ( + "os" +) + +var Files = os.DirFS("frontend/") diff --git a/frontend/embedded.go b/frontend/embedded.go new file mode 100644 index 0000000..5310d65 --- /dev/null +++ b/frontend/embedded.go @@ -0,0 +1,8 @@ +//go:build embed + +package frontend + +import "embed" + +//go:embed * +var Files embed.FS -- cgit 1.4.1