experienceolympic-com/scripts/css.sh

11 lines
636 B
Bash
Raw Normal View History

2023-12-05 22:07:08 +00:00
#!/bin/bash
set -euo pipefail
# 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/theme
# Yarn CSS only
yarn node-sass -r ./src --output ./dist --include-path node_modules --include-path src --output-style compressed --quiet
yarn postcss ./dist/{**,.,*}.css --replace --verbose --env production