diff --git a/.build/validate-icons.mjs b/.build/validate-icons.mjs index 8f618bf25..49819e423 100644 --- a/.build/validate-icons.mjs +++ b/.build/validate-icons.mjs @@ -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 } diff --git a/icons/filled/crown.svg b/icons/filled/crown.svg index bc6bf2251..e6b569f93 100644 --- a/icons/filled/crown.svg +++ b/icons/filled/crown.svg @@ -7,5 +7,5 @@ viewBox="0 0 24 24" fill="currentColor" > - + diff --git a/icons/filled/folder-open.svg b/icons/filled/folder-open.svg new file mode 100644 index 000000000..8f0c329ea --- /dev/null +++ b/icons/filled/folder-open.svg @@ -0,0 +1,11 @@ + + + +