From 761efab64e22ab871b5710481ef9da4d3fc598e2 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Tue, 27 Apr 2021 16:34:55 +0200 Subject: [PATCH] include js bundle in output / ignore "node_modules" in embedfs fixes #170 --- Makefile | 2 +- public/.gitignore | 1 + public/embed.go | 9 ++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 public/.gitignore diff --git a/Makefile b/Makefile index d258200..f7ead15 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ BINARIES += $(OUT_DIR)/mapserver-linux-arm JS_BUNDLE = public/js/bundle.js -all: $(OUT_DIR)/mapserver-linux-x86_64 +all: $(JS_BUNDLE) $(OUT_DIR)/mapserver-linux-x86_64 $(OUT_DIR): mkdir $@ diff --git a/public/.gitignore b/public/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/public/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/public/embed.go b/public/embed.go index c46a015..d24fd42 100644 --- a/public/embed.go +++ b/public/embed.go @@ -2,5 +2,12 @@ package public import "embed" -//go:embed * +//go:embed colors/* +//go:embed css/* +//go:embed pics/* +//go:embed sql/* +//go:embed webfonts/* +//go:embed *.html +//go:embed *.txt +//go:embed js/* var Files embed.FS