0
0

jhtml compiler

This commit is contained in:
thetek 2021-04-02 20:51:23 +02:00
parent 4b2781fba1
commit 29f19aa90b

25
ui/jhtml-compile.sh Executable file
View File

@ -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