packages/ui/scripts/README.md
optimize-ui-icons.jsOptimizes all SVG files in src/lib/icons/svg/ using svgo, then syncs src/lib/icons/names.ts.
# From the UI package root
pnpm optimize-ui-icons
# or
node scripts/optimize-ui-icons.js
.svg in src/lib/icons/svg/ with preset-default (keeping viewBox and groups intact)width="100%" and height="100%" on every <svg> so icons scale via CSSfill/stroke colors with currentColor (leaves none untouched)vector-effect="non-scaling-stroke" to all vector shape elementssrc/lib/icons/names.ts to reflect the current set of icon filesoptimize-file-icons.jsOptimises SVG file-type icons and writes them into src/lib/components/file/icon/svg/.
Supports two modes:
<svg-dir>, optimises them, and writes each into the output directory (adding new files, updating changed ones)preset-default (keeping viewBox and groups intact)width/height attributes so icons scale via CSS--file-icon-gray, --file-icon-green, --file-icon-teal, --file-icon-blue, --file-icon-dark-blue, --file-icon-yellow, --file-icon-orange, --file-icon-red, --file-icon-pink, --file-icon-purple, --file-icon-violet)# Optimize in place
pnpm optimize-file-icons
# or
node scripts/optimize-file-icons.js
# Import + optimize from a source directory
node scripts/optimize-file-icons.js <svg-dir>