Icons tidy-up (#2317)

- Wired up legacy icon paths
- Upgraded Lucide npm pkg
- Fixed Windows bug in generate script
This commit is contained in:
Lee Kelleher
2024-09-19 15:10:27 +01:00
committed by GitHub
parent 2b8a0c76a1
commit 4d17c8144a
535 changed files with 881 additions and 813 deletions

View File

@@ -124,16 +124,14 @@ const collectDiskIcons = async (icons) => {
iconPaths.forEach((path) => {
const rawData = readFileSync(path);
const svg = rawData.toString();
const pattern = /\/([^/]+)\.svg$/;
const parsed = pathModule.parse(path);
const match = path.match(pattern);
if (!match) {
console.log('No match found.');
if (!parsed) {
console.log('No match found for: ', path);
return;
}
const SVGFileName = match[1];
const SVGFileName = parsed.name;
const iconFileName = SVGFileName.replace('.svg', '');
const iconName = iconFileName;