aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-06-03 16:05:39 -0300
committerSebastian <sebasjm@gmail.com>2022-06-03 16:05:39 -0300
commitfee5de75624a1d8e42ac695876ab188ab2d92921 (patch)
treef1f365d7dd1e0e954f512bfbc7e1e7fe19c60429
parent459c1994e6d20c26c24254ae0cb36aa66926a5cb (diff)
build with esbuild
-rwxr-xr-xpackages/anastasis-webui/clean_and_build.sh23
-rw-r--r--packages/anastasis-webui/src/main.ts3
-rw-r--r--packages/anastasis-webui/ui.html28
3 files changed, 51 insertions, 3 deletions
diff --git a/packages/anastasis-webui/clean_and_build.sh b/packages/anastasis-webui/clean_and_build.sh
new file mode 100755
index 000000000..3da450c6b
--- /dev/null
+++ b/packages/anastasis-webui/clean_and_build.sh
@@ -0,0 +1,23 @@
+echo clean
+rm -rf dist
+mkdir -p dist/fonts
+cp \
+ src/scss/fonts/XRXV3I6Li01BKofINeaE.ttf \
+ src/scss/fonts/materialdesignicons-webfont-4.9.95.ttf \
+ src/scss/fonts/materialdesignicons-webfont-4.9.95.woff \
+ 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:.scss=text --loader:.svg=dataurl --format=iife --sourcemap --jsx-factory=h --jsx-fragment=Fragment --platform=browser &
+wait -n
+wait -n
+
+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
diff --git a/packages/anastasis-webui/src/main.ts b/packages/anastasis-webui/src/main.ts
index ee839bc4e..8e76449c2 100644
--- a/packages/anastasis-webui/src/main.ts
+++ b/packages/anastasis-webui/src/main.ts
@@ -1,9 +1,6 @@
import { setupI18n } from "@gnu-taler/taler-util";
import { h, render } from "preact";
import App from "./components/app";
-//import "./scss/main.scss";
-
-export default App;
function main(): void {
try {
diff --git a/packages/anastasis-webui/ui.html b/packages/anastasis-webui/ui.html
new file mode 100644
index 000000000..17c48e904
--- /dev/null
+++ b/packages/anastasis-webui/ui.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html
+ lang="en"
+ class="has-aside-left has-aside-mobile-transition has-navbar-fixed-top has-aside-expanded"
+>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
+ <meta name="mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+
+ <link
+ rel="icon"
+ href="data:;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////////////7//v38//78/P/+/fz//vz7///+/v/+/f3//vz7///+/v/+/fz//v38///////////////////////+/v3///7+/////////////////////////////////////////////////////////v3//v79///////+/v3///////r28v/ct5//06SG/9Gffv/Xqo7/7N/V/9e2nf/bsJb/6uDW/9Sskf/euKH/+/j2///////+/v3//////+3azv+/eE3/2rWd/9Kkhv/Vr5T/48i2/8J+VP/Qn3//3ryn/795Tf/WrpP/2LCW/8B6T//w4Nb///////Pn4P+/d0v/9u3n/+7d0v/EhV7//v///+HDr//fxLD/zph2/+TJt//8/Pv/woBX//Lm3f/y5dz/v3hN//bu6f/JjGn/4sW0///////Df1j/8OLZ//v6+P+/elH/+vj1//jy7f+/elL//////+zYzP/Eg13//////967p//MlHT/wn5X///////v4Nb/yY1s///////jw7H/06KG////////////z5t9/+fNvf//////x4pn//Pp4v/8+vn/w39X/8WEX///////5s/A/9CbfP//////27Oc/9y2n////////////9itlf/gu6f//////86Vdf/r2Mz//////8SCXP/Df1j//////+7d0v/KkG7//////+HBrf/VpYr////////////RnoH/5sq6///////Ii2n/8ubf//39/P/Cf1j/xohk/+bNvv//////wn5W//Tq4//58/D/wHxV//7+/f/59fH/v3xU//39/P/w4Nf/xIFb///////hw7H/yo9t/+/f1f/AeU3/+/n2/+nSxP/FhmD//////9qzm//Upon/4MSx/96+qf//////xINc/+3bz//48e3/v3hN//Pn3///////6M+//752S//gw6//06aK/8J+VP/kzLr/zZd1/8OCWv/q18r/17KZ/9Ooi//fv6r/v3dK/+vWyP///////v39///////27un/1aeK/9Opjv/m1cf/1KCC/9a0nP/n08T/0Jx8/82YdP/QnHz/16yR//jx7P///////v39///////+/f3///7+///////+//7//v7+///////+/v7//v/+/////////////////////////v7//v79///////////////////+/v/+/Pv//v39///+/v/+/Pv///7+//7+/f/+/Pv//v39//79/P/+/Pv///7+////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
+ />
+ <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
+ <style>
+ ANASTASIS_STYLE_CONTENT
+ </style>
+ </head>
+
+ <body>
+ <div id="container" class="anastasis-container"></div>
+ <script>
+ ANASTASIS_SCRIPT_CONTENT
+ </script>
+ </body>
+</html>