aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 09:52:36 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 10:06:56 +0100
commitbed4bbc560052a25e11704c6ee0b1d5cddbbc9a7 (patch)
treeef12cde21d2665d829c4e9ec233ff9115d47979a /static
parentRe-modularize javascript. (diff)
downloadcalp-bed4bbc560052a25e11704c6ee0b1d5cddbbc9a7.tar.gz
calp-bed4bbc560052a25e11704c6ee0b1d5cddbbc9a7.tar.xz
Slight frontend makefile improvements.
Diffstat (limited to 'static')
-rw-r--r--static/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/static/Makefile b/static/Makefile
index 7a541bf6..d55688ba 100644
--- a/static/Makefile
+++ b/static/Makefile
@@ -3,6 +3,9 @@
TARGETS := style.css smallcal.css script.out.js
WATCH=
+# script explicitly named, since that is our entry point
+TS_FILES = script.ts $(shell find . -type f -name \*.ts -not -path */node_modules/*)
+
export PATH := $(shell npm bin):$(PATH)
all: $(TARGETS)
@@ -11,11 +14,18 @@ all: $(TARGETS)
tail -n1 $< | tail -c+65 | base64 --decode | jq '.' > $@
# r!browserify --list script.ts -p tsify | xargs -L1 basename | tac
-script.out.js: script.ts popup.ts globals.ts vevent.ts types.ts dragable.ts clock.ts lib.ts
+script.out.js: $(TS_FILES)
browserify $< -p tsify --noImplicitAny --debug -o $@
+# Note that 'tsc --watch' doesn't provide the files we are using. It's
+# just here for debug.
watch:
- $(MAKE) WATCH=--watch all
+ tmux \
+ new-session "scss --watch -I. style.scss:style.css" \; \
+ split-window "tsc --watch" \; \
+ rename-session "calp watch" \; \
+ select-layout even-vertical
+
clean:
rm $(TARGETS)