From dd650e04ed9b9ce3fb2e5a425272161058ad18ef Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Sun, 8 Aug 2021 15:43:29 -0500 Subject: CSS is now properly generated and compatible. --- assets/css/compile.sh | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'assets/css/compile.sh') 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; -- cgit v1.2.3-70-g09d2