summaryrefslogtreecommitdiff
path: root/assets/css/compile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'assets/css/compile.sh')
-rwxr-xr-xassets/css/compile.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/assets/css/compile.sh b/assets/css/compile.sh
new file mode 100755
index 0000000..d3aab66
--- /dev/null
+++ b/assets/css/compile.sh
@@ -0,0 +1,51 @@
+#!/bin/sh -e
+
+HERE=$(dirname $(readlink -f ${0}));
+NODE=16.6.0-alpine3.14;
+
+cd ${HERE};
+
+#===============================================================
+docker run -v${HERE}:/x -w/x --rm -i node:${NODE} sh <<'EOF'
+apk update;
+apk upgrade;
+apk add git;
+#===============================================================
+
+cd /tmp;
+git clone https://github.com/sass/sass.git;
+cd sass;
+git checkout 2121f939b411c1650005b82c53557dd6248bff74;
+npm audit fix;
+npm install;
+npm install -g sass;
+cd /x;
+
+sass --no-source-map scss/theme.scss theme.css;
+chown 1000:1000 theme.css;
+
+#===============================================================
+EOF
+#===============================================================
+
+rm -fr fonts src;
+mkdir src;
+mv theme.css src;
+
+#===============================================================
+docker run -u$(id -u):$(id -g) -v${HERE}:/x -w/x --rm -i node:${NODE} sh <<'EOF'
+#===============================================================
+
+npm install;
+npm run build;
+
+#===============================================================
+EOF
+#===============================================================
+
+mv css/theme.css .;
+mv fonts ..;
+
+rm -fr node_modules;
+rm -fr css;
+rm -fr src;