From 29f19aa90b6e763a165fcb12fa8c630acad3fb38 Mon Sep 17 00:00:00 2001 From: thetek42 Date: Fri, 2 Apr 2021 20:51:23 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20jhtml=20compiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/jhtml-compile.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 ui/jhtml-compile.sh diff --git a/ui/jhtml-compile.sh b/ui/jhtml-compile.sh new file mode 100755 index 0000000..7a853a9 --- /dev/null +++ b/ui/jhtml-compile.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +### make code compatible with jhtml + +# compile pug +pug raw/index.pug -o jhtml-compat +mv jhtml-compat/index.html jhtml-compat/index.php +echo "*title(\"dnswatch\") +*icon() +*style(\"///index.css\") +*style(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;700&display=swap\") +*js(\"///index.js\") +*js(\"https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js\") +*postjs(\"///feather.js\")" | cat - jhtml-compat/index.php > temp +mv temp jhtml-compat/index.php + +# compile sass +sass raw/index.sass jhtml-compat/index.css +echo '*stop()' | cat - jhtml-compat/index.css > temp +mv temp jhtml-compat/index.css + +# move js +cp raw/*.js jhtml-compat +echo '*stop()' | cat - jhtml-compat/index.js > temp +mv temp jhtml-compat/index.js