Add working CSS compiling script that bypasses node/grunt

This commit is contained in:
benjamin melançon 2021-07-14 07:54:51 -04:00
parent 0f394481d1
commit 2f45fe92a2

9
scripts/css.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
set -e
# Confirmed with echo `pwd` that as long as we use via composer it's always in
# /var/www/html (aka the project root).
proj_dir="$(cd $(dirname ${0})/../ && pwd)" # Parent of this script folder.
[ "$proj_dir" != "/var/www/html" ] && { echo "Script running from unexpected path - are you running within ddev, as you should? Try ddev composer css"; exit 1; }
cd /var/www/html/web/themes/custom/agarica/patternlibrary
sassc agaric/sass/agaric.scss agaric/css/agaric.css
echo "Don't forget to commit any updates in the submodule web/themes/custom/agarica/patternlibrary"