aboutsummaryrefslogtreecommitdiff
path: root/static/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'static/Makefile')
-rw-r--r--static/Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/static/Makefile b/static/Makefile
index 07c72b2f..17432585 100644
--- a/static/Makefile
+++ b/static/Makefile
@@ -1,17 +1,18 @@
.PHONY: all install clean watch watch-esbuild doc
-TARGETS := style.css smallcal.css script.js directory-listing.css
+_TARGETS := style.css smallcal.css script.js directory-listing.css
+TARGETS = $(addprefix out/,$(_TARGETS))
WATCH=
-TS_FILES = $(shell find . -type f -name \*.ts -not -path */node_modules/*)
-JS_FILES = $(TS_FILES:%.ts=%.js)
+TS_FILES = $(shell find ts -type f -name \*.ts)
+JS_FILES = $(TS_FILES:ts/%.ts=out/%.js)
ESBUILD_LOGLEVEL=warning
# Variable for adding extra flags
ESBUILD_FLAGS =
# Used flags
__ESBUILD_FLAGS = --log-level=$(ESBUILD_LOGLEVEL) \
- --sourcemap --bundle --outdir=$(CURDIR) \
+ --sourcemap --bundle --outdir=$(CURDIR)/out \
$(ESBUILD_FLAGS)
export PATH := $(shell npm bin):$(PATH)
@@ -19,11 +20,11 @@ export PATH := $(shell npm bin):$(PATH)
all: $(TARGETS)
# script explicitly named, since that is our entry point
-script.js: script.ts $(TS_FILES)
+out/script.js: ts/script.ts $(TS_FILES)
esbuild $< $(__ESBUILD_FLAGS)
watch-esbuild:
- $(MAKE) ESBUILD_FLAGS+='--watch' ESBUILD_LOGLEVEL=info -B script.js
+ $(MAKE) ESBUILD_FLAGS+='--watch' ESBUILD_LOGLEVEL=info -B out/script.js
deps.svg: $(TS_FILES)
madge --image $@ $^
@@ -38,8 +39,8 @@ install: all
clean:
-rm $(TARGETS)
-%.css: %.scss
+out/%.css: scss/%.scss
scss -E UTF-8 $(WATCH) -I. $< $@
doc:
- typedoc --logLevel Verbose --excludeExternals --entryPointStrategy expand .
+ typedoc --logLevel Verbose --excludeExternals