aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/calp/html/view/calendar.scm35
-rw-r--r--static/.gitignore1
-rw-r--r--static/Makefile11
-rw-r--r--static/package.json6
4 files changed, 37 insertions, 16 deletions
diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm
index f9c60279..727fd8ba 100644
--- a/module/calp/html/view/calendar.scm
+++ b/module/calp/html/view/calendar.scm
@@ -104,21 +104,26 @@
,(include-alt-css "/static/dark.css" '(title "Dark"))
,(include-alt-css "/static/light.css" '(title "Light"))
- (script (@ (defer) (src "/static/types.js")))
- (script (@ (defer) (src "/static/lib.js")))
- (script (@ (defer) (src "/static/jcal.js")))
- (script (@ (defer) (src "/static/dragable.js")))
- (script (@ (defer) (src "/static/clock.js")))
- (script (@ (defer) (src "/static/popup.js")))
- ;; (script (@ (defer) (src "/static/rrule.js")))
- ;; (script (@ (defer) (src "/static/binders.js")))
- (script (@ (defer) (src "/static/server_connect.js")))
- ;; (script (@ (defer) (src "/static/input_list.js")))
- ;; (script (@ (defer) (src "/static/date_time.js")))
- ;; (script (@ (defer) (src "/static/vcal.js")))
- (script (@ (defer) (src "/static/script.js")))
- (script (@ (defer) (src "/static/vevent.js")))
- (script (@ (defer) (src "/static/globals.js")))
+ ;; (script (@ (defer) (src "/static/types.js")))
+ ;; (script (@ (defer) (src "/static/lib.js")))
+ ;; (script (@ (defer) (src "/static/jcal.js")))
+ ;; (script (@ (defer) (src "/static/dragable.js")))
+ ;; (script (@ (defer) (src "/static/clock.js")))
+ ;; (script (@ (defer) (src "/static/popup.js")))
+ ;; ;; (script (@ (defer) (src "/static/rrule.js")))
+ ;; ;; (script (@ (defer) (src "/static/binders.js")))
+ ;; (script (@ (defer) (src "/static/server_connect.js")))
+ ;; ;; (script (@ (defer) (src "/static/input_list.js")))
+ ;; ;; (script (@ (defer) (src "/static/date_time.js")))
+ ;; ;; (script (@ (defer) (src "/static/vcal.js")))
+ ;; (script (@ (defer) (src "/static/script.js")))
+ ;; (script (@ (defer) (src "/static/vevent.js")))
+ ;; (script (@ (defer) (src "/static/globals.js")))
+
+ ;; (script (@ (type module) (src "/static/script.js")))
+ ;; (script (@ (src "/static/dist/main.js")))
+ (script (@ (src "/static/script.out.js")))
+ ;; (script (@ (src "/static/build.js")))
;; on load
diff --git a/static/.gitignore b/static/.gitignore
index 3153016b..3d4116d2 100644
--- a/static/.gitignore
+++ b/static/.gitignore
@@ -11,3 +11,4 @@ script.js
server_connect.js
types.js
vevent.js
+*.out.js
diff --git a/static/Makefile b/static/Makefile
index 821489bc..7a541bf6 100644
--- a/static/Makefile
+++ b/static/Makefile
@@ -1,10 +1,19 @@
.PHONY: all clean watch
-TARGETS := style.css smallcal.css
+TARGETS := style.css smallcal.css script.out.js
WATCH=
+export PATH := $(shell npm bin):$(PATH)
+
all: $(TARGETS)
+%.map.json: %.out.js
+ 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
+ browserify $< -p tsify --noImplicitAny --debug -o $@
+
watch:
$(MAKE) WATCH=--watch all
diff --git a/static/package.json b/static/package.json
new file mode 100644
index 00000000..a25830a1
--- /dev/null
+++ b/static/package.json
@@ -0,0 +1,6 @@
+{
+ "dependencies": {
+ "browserify": "^17.0.0",
+ "tsify": "^5.0.4"
+ }
+}