feat: upgrade from Tailwind v3 to v4

See Tailwind v4 breaking changes: https://tailwindcss.com/docs/upgrade-guide
See Hugo's new integration with Tailwind v4: https://gohugo.io/functions/css/tailwindcss/

Close #3211
This commit is contained in:
George Cushen committed 2025-08-17 20:58:14 +01:00
1 parent 1525b21059
commit 7722abcd66
61 files changed
+4607 -1458

No files matched your search

+30
View File
@@ -8,6 +8,25 @@ exitfn () {
trap "exitfn" INT # Set up SIGINT trap to call function.
# Check if starter name is provided
if [ -z "$1" ]; then
echo "Usage: ./scripts/view-starter-dev.sh <starter-name>"
echo "Example: ./scripts/view-starter-dev.sh blog"
exit 1
fi
# Install Tailwind v4 dependencies if blox-tailwind module is present
if [ -d "modules/blox-tailwind" ]; then
echo "📦 Installing Tailwind v4 dependencies in module..."
cd modules/blox-tailwind
if command -v pnpm &> /dev/null; then
pnpm install
else
npm install
fi
cd ../..
fi
# export HUGO_STATS_PATH="./starters/$1/hugo_stats.json"
# printf 'HUGO_STATS_PATH: %s\n' "$HUGO_STATS_PATH"
@@ -15,6 +34,17 @@ trap "exitfn" INT # Set up SIGINT trap to call function.
# due to Hugo limitation requiring Hugo to be run from site dir
cd "starters/$1"
# Install Tailwind CLI in starter directory if package.json exists
# Hugo's css.TailwindCSS function needs to find the CLI from where Hugo runs
if [ -f "package.json" ]; then
echo "📦 Installing Tailwind CLI in starter directory for Hugo..."
if command -v pnpm &> /dev/null; then
pnpm install
else
npm install
fi
fi
export HUGO_BLOX_DEMO=true \
export HUGO_BLOX_DEBUG=true \
export HUGO_ENVIRONMENT=development \