23 lines
573 B
Bash
Executable File
23 lines
573 B
Bash
Executable File
#!/bin/zsh
|
||
|
||
echo "🩹 Auto-patching SCSS files with @reference \"tailwindcss\"..."
|
||
|
||
SCSS_FILES=$(find src -type f -name "*.scss")
|
||
|
||
for FILE in $SCSS_FILES; do
|
||
echo "Checking: $FILE"
|
||
|
||
# Skip if already has @reference
|
||
if grep -q '@reference "tailwindcss"' "$FILE"; then
|
||
echo " ✔ Already patched"
|
||
continue
|
||
fi
|
||
|
||
echo " ➕ Adding @reference to $FILE"
|
||
|
||
# Prepend @reference at top of file
|
||
echo '@reference "tailwindcss";' | cat - "$FILE" > "$FILE.tmp" && mv "$FILE.tmp" "$FILE"
|
||
done
|
||
|
||
echo "🎉 All SCSS files have been patched for Tailwind v4!"
|