summaryrefslogtreecommitdiff
path: root/assets/css/compile.sh
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-08-08 20:44:26 +0000
committerZach van Rijn <me@zv.io>2021-08-08 20:44:26 +0000
commit7a0e3080777627bba6d157cdc6ef91ce976d5feb (patch)
tree5b257dcc6600e8c17c8bb93e993b6102a014f33a /assets/css/compile.sh
parentb9f36e28b13d3210053b23ac2adda122afcf74d0 (diff)
parentdd650e04ed9b9ce3fb2e5a425272161058ad18ef (diff)
downloadsite-ng-7a0e3080777627bba6d157cdc6ef91ce976d5feb.tar.gz
site-ng-7a0e3080777627bba6d157cdc6ef91ce976d5feb.tar.bz2
site-ng-7a0e3080777627bba6d157cdc6ef91ce976d5feb.tar.xz
site-ng-7a0e3080777627bba6d157cdc6ef91ce976d5feb.zip
Merge branch 'old-browser-support-test' into 'master'
Old browser support test See merge request adelie/site-ng!1
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;