diff --git a/packages/anastasis-webui/clean_and_build.sh b/packages/anastasis-webui/clean_and_build.sh
index 300ed8930..2fa3ec777 100755
--- a/packages/anastasis-webui/clean_and_build.sh
+++ b/packages/anastasis-webui/clean_and_build.sh
@@ -10,16 +10,51 @@ cp \
src/scss/fonts/materialdesignicons-webfont-4.9.95.woff2 \
dist/fonts
-echo css
-pnpm exec sass -I . ./src/scss/main.scss dist/main.css &
-echo js
-pnpm exec esbuild --log-level=error --bundle src/main.ts --outdir=dist --target=es6 --loader:.svg=dataurl --format=iife --sourcemap --jsx-factory=h --jsx-fragment=Fragment --platform=browser &
+function build_css() {
+ pnpm exec sass -I . ./src/scss/main.scss dist/main.css
+}
+function build_js() {
+ pnpm exec esbuild --log-level=error --bundle $1 --outdir=dist --target=es6 --loader:.svg=dataurl --format=iife --sourcemap --jsx-factory=h --jsx-fragment=Fragment --platform=browser
+}
+
+function bundle() {
+ cat html/$1.html \
+ | sed -e '/ANASTASIS_SCRIPT_CONTENT/ {' -e 'r dist/main.js' -e 'd' -e '}' \
+ | sed -e '/ANASTASIS_STYLE_CONTENT/ {' -e 'r dist/main.css' -e 'd' -e '}' \
+ >dist/$1.html
+}
+
+function cleanup {
+ trap - SIGHUP SIGINT SIGTERM SIGQUIT
+ echo -n "Cleaning up... "
+ kill -- -$$
+ exit 1
+}
+trap cleanup SIGHUP SIGINT SIGTERM SIGQUIT
+
+
+echo compile
+build_css &
+build_js src/main.ts &
+build_js src/main.test.ts &
wait -n
wait -n
+wait -n
+pnpm run --silent test -- -R dot
echo html
-cat ui.html \
- | sed -e '/ANASTASIS_SCRIPT_CONTENT/ {' -e 'r dist/main.js' -e 'd' -e '}' \
- | sed -e '/ANASTASIS_STYLE_CONTENT/ {' -e 'r dist/main.css' -e 'd' -e '}' \
- >dist/index.html
-echo done
+bundle ui
+bundle ui-dev
+
+
+if [ "WATCH" == "$1" ]; then
+
+ echo watch mode
+ inotifywait -e close_write -r src -q -m | while read line; do
+ DATE=$(date)
+ echo $DATE $line
+ build_js src/main.ts
+ bundle ui-dev
+ ./watch/send_reload.sh
+ done;
+fi
diff --git a/packages/anastasis-webui/dev.mjs b/packages/anastasis-webui/dev.mjs
index d6b6bf10d..3f4915ffc 100755
--- a/packages/anastasis-webui/dev.mjs
+++ b/packages/anastasis-webui/dev.mjs
@@ -1,4 +1,19 @@
#!/usr/bin/env node
+/*
+ This file is part of GNU Anastasis
+ (C) 2021-2022 Anastasis SARL
+
+ GNU Anastasis is free software; you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Anastasis is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License along with
+ GNU Anastasis; see the file COPYING. If not, see
@@ -151,18 +144,11 @@ export function ContinentSelectionScreen(): VNode { }} >
- If you just want to try out Anastasis, we recomment that you + If you just want to try out Anastasis, we recommend that you choose Testcontinent with Demoland. For this special country, you will be asked for a simple number and not real, personal identifiable information.
- {/* -- Because of the diversity of personally identifying information in - different countries and cultures, we do not support all countries - yet. If you want to improve the supported countries,{" "} - contact us. -
*/}