aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-05 01:25:00 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-05 01:25:00 +0200
commit7949fcdc683d07689bad5da5d20bfa3eeb5a6a46 (patch)
treec1bc39dc0e508ee498cf7119f888f513db4bab8f
parentAdd build step for jsdoc. (diff)
downloadcalp-7949fcdc683d07689bad5da5d20bfa3eeb5a6a46.tar.gz
calp-7949fcdc683d07689bad5da5d20bfa3eeb5a6a46.tar.xz
Move frontend code to subdirectories, to simplify command line flags.
-rw-r--r--static/Makefile17
-rwxr-xr-xstatic/make-watch2
-rw-r--r--static/package-lock.json5
-rw-r--r--static/scss/_global.scss (renamed from static/_global.scss)0
-rw-r--r--static/scss/_slider_input.scss (renamed from static/_slider_input.scss)0
-rw-r--r--static/scss/_small-calendar.scss (renamed from static/_small-calendar.scss)0
-rw-r--r--static/scss/directory-listing.scss (renamed from static/directory-listing.scss)0
-rw-r--r--static/scss/smallcal.scss (renamed from static/smallcal.scss)0
-rw-r--r--static/scss/style.scss (renamed from static/style.scss)0
-rw-r--r--static/ts/clock.ts (renamed from static/clock.ts)0
-rw-r--r--static/ts/components.ts (renamed from static/components.ts)0
-rw-r--r--static/ts/components/changelog.ts (renamed from static/components/changelog.ts)0
-rw-r--r--static/ts/components/date-jump.ts (renamed from static/components/date-jump.ts)0
-rw-r--r--static/ts/components/date-time-input.ts (renamed from static/components/date-time-input.ts)0
-rw-r--r--static/ts/components/edit-rrule.ts (renamed from static/components/edit-rrule.ts)0
-rw-r--r--static/ts/components/input-list.ts (renamed from static/components/input-list.ts)0
-rw-r--r--static/ts/components/popup-element.ts (renamed from static/components/popup-element.ts)0
-rw-r--r--static/ts/components/slider.ts (renamed from static/components/slider.ts)0
-rw-r--r--static/ts/components/tab-group-element.ts (renamed from static/components/tab-group-element.ts)0
-rw-r--r--static/ts/components/vevent-block.ts (renamed from static/components/vevent-block.ts)0
-rw-r--r--static/ts/components/vevent-description.ts (renamed from static/components/vevent-description.ts)0
-rw-r--r--static/ts/components/vevent-dl.ts (renamed from static/components/vevent-dl.ts)0
-rw-r--r--static/ts/components/vevent-edit.ts (renamed from static/components/vevent-edit.ts)0
-rw-r--r--static/ts/components/vevent.ts (renamed from static/components/vevent.ts)0
-rw-r--r--static/ts/event-creator.ts (renamed from static/event-creator.ts)0
-rw-r--r--static/ts/formatters.ts (renamed from static/formatters.ts)0
-rw-r--r--static/ts/globals.ts (renamed from static/globals.ts)0
-rw-r--r--static/ts/jcal.ts (renamed from static/jcal.ts)0
-rw-r--r--static/ts/lib.ts (renamed from static/lib.ts)0
-rw-r--r--static/ts/script.ts (renamed from static/script.ts)0
-rw-r--r--static/ts/server_connect.ts (renamed from static/server_connect.ts)0
-rw-r--r--static/ts/types.ts (renamed from static/types.ts)0
-rw-r--r--static/ts/vevent.ts (renamed from static/vevent.ts)0
-rw-r--r--static/tsconfig.json4
34 files changed, 17 insertions, 11 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
diff --git a/static/make-watch b/static/make-watch
index b328038a..a1a6def8 100755
--- a/static/make-watch
+++ b/static/make-watch
@@ -13,7 +13,7 @@ if [ -n "$TMUX" ]; then
tmux new-window "tsc --watch"
else
tmux \
- new-session "scss --watch -I. style.scss:style.css" \; \
+ new-session "scss --watch -I. scss/style.scss:out/style.css" \; \
split-window "tsc --watch --noEmit" \; \
split-window "make watch-esbuild" \; \
rename-session "calp watch" \; \
diff --git a/static/package-lock.json b/static/package-lock.json
index eceeead7..36521446 100644
--- a/static/package-lock.json
+++ b/static/package-lock.json
@@ -1,9 +1,12 @@
{
- "name": "static",
+ "name": "calp",
+ "version": "0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
+ "name": "calp",
+ "version": "0.1",
"dependencies": {
"@microsoft/tsdoc": "^0.14.2",
"typedoc": "^0.24.6",
diff --git a/static/_global.scss b/static/scss/_global.scss
index 58e05155..58e05155 100644
--- a/static/_global.scss
+++ b/static/scss/_global.scss
diff --git a/static/_slider_input.scss b/static/scss/_slider_input.scss
index adae56ae..adae56ae 100644
--- a/static/_slider_input.scss
+++ b/static/scss/_slider_input.scss
diff --git a/static/_small-calendar.scss b/static/scss/_small-calendar.scss
index c4814285..c4814285 100644
--- a/static/_small-calendar.scss
+++ b/static/scss/_small-calendar.scss
diff --git a/static/directory-listing.scss b/static/scss/directory-listing.scss
index 745b5bc3..745b5bc3 100644
--- a/static/directory-listing.scss
+++ b/static/scss/directory-listing.scss
diff --git a/static/smallcal.scss b/static/scss/smallcal.scss
index c9a356c4..c9a356c4 100644
--- a/static/smallcal.scss
+++ b/static/scss/smallcal.scss
diff --git a/static/style.scss b/static/scss/style.scss
index d5920f79..d5920f79 100644
--- a/static/style.scss
+++ b/static/scss/style.scss
diff --git a/static/clock.ts b/static/ts/clock.ts
index bbd15de0..bbd15de0 100644
--- a/static/clock.ts
+++ b/static/ts/clock.ts
diff --git a/static/components.ts b/static/ts/components.ts
index e5fabba6..e5fabba6 100644
--- a/static/components.ts
+++ b/static/ts/components.ts
diff --git a/static/components/changelog.ts b/static/ts/components/changelog.ts
index d08f7cb3..d08f7cb3 100644
--- a/static/components/changelog.ts
+++ b/static/ts/components/changelog.ts
diff --git a/static/components/date-jump.ts b/static/ts/components/date-jump.ts
index fd3908ae..fd3908ae 100644
--- a/static/components/date-jump.ts
+++ b/static/ts/components/date-jump.ts
diff --git a/static/components/date-time-input.ts b/static/ts/components/date-time-input.ts
index 20e9a505..20e9a505 100644
--- a/static/components/date-time-input.ts
+++ b/static/ts/components/date-time-input.ts
diff --git a/static/components/edit-rrule.ts b/static/ts/components/edit-rrule.ts
index a361bdee..a361bdee 100644
--- a/static/components/edit-rrule.ts
+++ b/static/ts/components/edit-rrule.ts
diff --git a/static/components/input-list.ts b/static/ts/components/input-list.ts
index 0afd4999..0afd4999 100644
--- a/static/components/input-list.ts
+++ b/static/ts/components/input-list.ts
diff --git a/static/components/popup-element.ts b/static/ts/components/popup-element.ts
index 458f543c..458f543c 100644
--- a/static/components/popup-element.ts
+++ b/static/ts/components/popup-element.ts
diff --git a/static/components/slider.ts b/static/ts/components/slider.ts
index 48abc91b..48abc91b 100644
--- a/static/components/slider.ts
+++ b/static/ts/components/slider.ts
diff --git a/static/components/tab-group-element.ts b/static/ts/components/tab-group-element.ts
index e90997e9..e90997e9 100644
--- a/static/components/tab-group-element.ts
+++ b/static/ts/components/tab-group-element.ts
diff --git a/static/components/vevent-block.ts b/static/ts/components/vevent-block.ts
index 9bbb8e7e..9bbb8e7e 100644
--- a/static/components/vevent-block.ts
+++ b/static/ts/components/vevent-block.ts
diff --git a/static/components/vevent-description.ts b/static/ts/components/vevent-description.ts
index b44185e7..b44185e7 100644
--- a/static/components/vevent-description.ts
+++ b/static/ts/components/vevent-description.ts
diff --git a/static/components/vevent-dl.ts b/static/ts/components/vevent-dl.ts
index a792c07f..a792c07f 100644
--- a/static/components/vevent-dl.ts
+++ b/static/ts/components/vevent-dl.ts
diff --git a/static/components/vevent-edit.ts b/static/ts/components/vevent-edit.ts
index e3b5d105..e3b5d105 100644
--- a/static/components/vevent-edit.ts
+++ b/static/ts/components/vevent-edit.ts
diff --git a/static/components/vevent.ts b/static/ts/components/vevent.ts
index 7487cbb6..7487cbb6 100644
--- a/static/components/vevent.ts
+++ b/static/ts/components/vevent.ts
diff --git a/static/event-creator.ts b/static/ts/event-creator.ts
index 5e55e64e..5e55e64e 100644
--- a/static/event-creator.ts
+++ b/static/ts/event-creator.ts
diff --git a/static/formatters.ts b/static/ts/formatters.ts
index e0018278..e0018278 100644
--- a/static/formatters.ts
+++ b/static/ts/formatters.ts
diff --git a/static/globals.ts b/static/ts/globals.ts
index 243e15e4..243e15e4 100644
--- a/static/globals.ts
+++ b/static/ts/globals.ts
diff --git a/static/jcal.ts b/static/ts/jcal.ts
index 41f33db4..41f33db4 100644
--- a/static/jcal.ts
+++ b/static/ts/jcal.ts
diff --git a/static/lib.ts b/static/ts/lib.ts
index 2ef5b596..2ef5b596 100644
--- a/static/lib.ts
+++ b/static/ts/lib.ts
diff --git a/static/script.ts b/static/ts/script.ts
index 9238d834..9238d834 100644
--- a/static/script.ts
+++ b/static/ts/script.ts
diff --git a/static/server_connect.ts b/static/ts/server_connect.ts
index 29f5bab2..29f5bab2 100644
--- a/static/server_connect.ts
+++ b/static/ts/server_connect.ts
diff --git a/static/types.ts b/static/ts/types.ts
index 64e2c709..64e2c709 100644
--- a/static/types.ts
+++ b/static/ts/types.ts
diff --git a/static/vevent.ts b/static/ts/vevent.ts
index f3606f70..f3606f70 100644
--- a/static/vevent.ts
+++ b/static/ts/vevent.ts
diff --git a/static/tsconfig.json b/static/tsconfig.json
index 45c6ae73..69d8fe06 100644
--- a/static/tsconfig.json
+++ b/static/tsconfig.json
@@ -34,7 +34,9 @@
"include": ["**/*"],
"exclude": ["node_modules", "**/*.spec.ts"],
"typedocOptions": {
- "entryPoints": ["./src"],
+ "entryPointStrategy": "expand",
+ "entryPoints": ["./ts"],
+ "exclude": ["node_modules"],
"out": "docs"
}
}