summaryrefslogtreecommitdiff
path: root/assets/css/compile.sh
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-08-08 15:43:29 -0500
committerZach van Rijn <me@zv.io>2021-08-08 15:43:29 -0500
commitdd650e04ed9b9ce3fb2e5a425272161058ad18ef (patch)
treec22576ba92c697aa0dd3787b7da290ca9809add5 /assets/css/compile.sh
parent885939380d73da581aa5502ae49cfd1f531504bf (diff)
downloadsite-ng-dd650e04ed9b9ce3fb2e5a425272161058ad18ef.tar.gz
site-ng-dd650e04ed9b9ce3fb2e5a425272161058ad18ef.tar.bz2
site-ng-dd650e04ed9b9ce3fb2e5a425272161058ad18ef.tar.xz
site-ng-dd650e04ed9b9ce3fb2e5a425272161058ad18ef.zip
CSS is now properly generated and compatible.
Diffstat (limited to 'assets/css/compile.sh')
-rwxr-xr-xassets/css/compile.sh37
1 files changed, 32 insertions, 5 deletions
diff --git a/assets/css/compile.sh b/assets/css/compile.sh
index 2487f07..d3aab66 100755
--- a/assets/css/compile.sh
+++ b/assets/css/compile.sh
@@ -1,13 +1,39 @@
#!/bin/sh -e
HERE=$(dirname $(readlink -f ${0}));
+NODE=16.6.0-alpine3.14;
cd ${HERE};
-rm -fr fonts;
+#===============================================================
+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:16.6.0-alpine3.14 sh <<'EOF'
+docker run -u$(id -u):$(id -g) -v${HERE}:/x -w/x --rm -i node:${NODE} sh <<'EOF'
#===============================================================
npm install;
@@ -17,8 +43,9 @@ npm run build;
EOF
#===============================================================
-mv out/theme.css .;
-mv out/fonts .;
+mv css/theme.css .;
+mv fonts ..;
rm -fr node_modules;
-rm -fr out;
+rm -fr css;
+rm -fr src;