Bladeren bron

Excluded the "return-arrow" icon from the clean-up-svg-icons task to preserve its delicate structure.

Aleksander Nowodzinski 5 jaren geleden
bovenliggende
commit
70aa784f17
1 gewijzigde bestanden met toevoegingen van 10 en 1 verwijderingen
  1. 10 1
      scripts/clean-up-svg-icons.sh

+ 10 - 1
scripts/clean-up-svg-icons.sh

@@ -12,7 +12,16 @@
 # To optimize the entire project:
 #	yarn clean-up-svg-icons packages/**/theme/icons
 
+# A list of icons that should not NOT be cleaned up. Their internal structure should not be changed
+# because, for instance, CSS animations may depend on it.
+BLACKLIST=("return-arrow.svg")
+
 for i in "$@"
 do
-	svgo --config=./scripts/svgo.config.json -i $i
+	if [[ " ${BLACKLIST[@]} " =~ " $(basename $i) " ]]
+	then
+		echo "\x1B[33m[clean-up-svg-icons]\x1B[0m Note: \"$i\" is blacklisted, skipping."
+	else
+		svgo --config=./scripts/svgo.config.json -i $i
+	fi
 done