Enhance icon validation by ensuring only .svg files exist in filled and outline directories; update crown and folder-open SVG files for consistency and clarity.
This commit is contained in:
parent
36e7957d35
commit
8c7b40be1c
|
|
@ -14,6 +14,24 @@ const outlineIconsNames = globSync(join(ICONS_SRC_DIR, 'outline/*.svg')).map(i =
|
|||
|
||||
let unicodes = []
|
||||
|
||||
// Validate that only .svg files exist in icons/filled and icons/outline directories
|
||||
types.forEach(type => {
|
||||
const dirPath = join(ICONS_SRC_DIR, type)
|
||||
const files = fs.readdirSync(dirPath)
|
||||
|
||||
files.forEach(file => {
|
||||
// Ignore .DS_Store (macOS system file)
|
||||
if (file === '.DS_Store') {
|
||||
return
|
||||
}
|
||||
|
||||
if (!file.endsWith('.svg')) {
|
||||
console.log(`⛔️ Directory \`icons/${type}\` contains non-SVG file: \`${file}\``)
|
||||
error = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const duplicateExists = (arr) => {
|
||||
return new Set(arr).size !== arr.length
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@
|
|||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path d="M19,19H5c-.5,0-.9-.3-1-.8l-2-10c0-.4.1-.8.5-1.1.4-.2.8-.2,1.1,0l4.1,3.3,3.4-5.1c.4-.6,1.3-.6,1.7,0l3.4,5.1,4.1-3.3c.3-.3.8-.3,1.1,0,.4.2.5.6.5,1.1l-2,10c0,.5-.5.8-1,.8Z" />
|
||||
<path d="M19 19h-14c-.5 0 -.9 -.3 -1 -.8l-2 -10c0 -.4 .1 -.8 .5 -1.1c.4 -.2 .8 -.2 1.1 0l4.1 3.3l3.4 -5.1c.4 -.6 1.3 -.6 1.7 0l3.4 5.1l4.1 -3.3c.3 -.3 .8 -.3 1.1 0c.4 .2 .5 .6 .5 1.1l-2 10c0 .5 -.5 .8 -1 .8z" />
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 345 B |
|
|
@ -1,3 +1,11 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 6C2 5.20435 2.3163 4.44152 2.87891 3.87891C3.44152 3.3163 4.20435 3 5 3H9L9.09863 3.00488C9.32763 3.02757 9.54289 3.12883 9.70703 3.29297L12.4141 6H19C19.7957 6 20.5585 6.3163 21.1211 6.87891C21.4405 7.19829 21.6805 7.5822 21.8283 8L7.30469 8C6.89764 8.00015 6.49954 8.12451 6.16504 8.35645C5.8726 8.5593 5.64041 8.83611 5.49121 9.15723L5.43262 9.29785L4.05371 12.9736C3.86005 13.4905 4.12192 14.0667 4.63867 14.2607C5.15577 14.4547 5.7328 14.1929 5.92676 13.6758L7.0614 10.649C7.20774 10.2586 7.58089 10 7.99777 10H21L21.2168 10.0117C21.4324 10.0353 21.6432 10.0939 21.8408 10.1855C21.8952 10.2108 21.9483 10.2384 22 10.2682C22.1986 10.383 22.3765 10.5314 22.5254 10.707C22.713 10.9286 22.8506 11.1889 22.9277 11.4688C23.0048 11.7485 23.0202 12.0419 22.9727 12.3281C22.9713 12.336 22.9693 12.3437 22.9678 12.3516L21.9727 17.5625C21.8418 18.248 21.4752 18.8666 20.9375 19.3115C20.4672 19.7006 19.8911 19.9354 19.2871 19.9883L19.0264 20H5C4.20435 20 3.44151 19.6837 2.87891 19.1211C2.3163 18.5585 2 17.7956 2 17V6Z" fill="black"/>
|
||||
<!--
|
||||
-->
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path d="M2 6c0 -.796 .316 -1.558 .879 -2.121c.563 -.563 1.325 -.879 2.121 -.879h4l.099 .005c.229 .023 .444 .124 .608 .288l2.707 2.707h6.586c.796 0 1.558 .316 2.121 .879c.319 .319 .559 .703 .707 1.121l-14.523 0c-.407 0 -.805 .125 -1.14 .356c-.292 .203 -.525 .48 -.674 .801l-.058 .141l-1.379 3.676c-.194 .517 .068 1.093 .585 1.287c.517 .194 1.094 -.068 1.288 -.585l1.134 -3.027c.146 -.39 .519 -.649 .937 -.649h13.002l.217 .012c.216 .024 .426 .082 .624 .173c.054 .025 .107 .053 .159 .083c.199 .115 .377 .263 .525 .439c.188 .222 .325 .482 .403 .762c.077 .28 .092 .573 .045 .859c-.001 .008 -.003 .016 -.005 .024l-.995 5.21c-.131 .686 -.497 1.304 -1.036 1.749c-.47 .389 -1.046 .624 -1.65 .677l-.261 .012h-14.026c-.796 0 -1.558 -.316 -2.121 -.879c-.563 -.563 -.879 -1.325 -.879 -2.121v-11z" fill="black" />
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 934 B |
Loading…
Reference in New Issue