Icons tidy-up (#2317)
- Wired up legacy icon paths - Upgraded Lucide npm pkg - Fixed Windows bug in generate script
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user