make Umbraco logo not legacy

This commit is contained in:
Niels Lyngsø
2023-11-07 13:02:46 +01:00
parent 0aa5c7ce63
commit a83eb0ffcf
3 changed files with 32 additions and 2 deletions

View File

@@ -30,7 +30,6 @@ const collectDictionaryIcons = async () => {
// Lucide:
fileJSON.lucide.forEach((iconDef) => {
// enables leaving things uncommented via underscore
if(iconDef.file && iconDef.name) {
const path = lucideSvgDirectory + "/" + iconDef.file;
@@ -57,6 +56,31 @@ const collectDictionaryIcons = async () => {
}
});
// Umbraco:
fileJSON.umbraco.forEach((iconDef) => {
if(iconDef.file && iconDef.name) {
const path = umbracoSvgDirectory + "/" + iconDef.file;
try {
const rawData = readFileSync(path);
const svg = rawData.toString()
const iconFileName = iconDef.name;
const icon = {
name: iconDef.name,
legacy: iconDef.legacy,
fileName: iconFileName,
svg,
output: `${iconsOutputDirectory}/${iconFileName}.js`,
};
icons.push(icon);
} catch(e) {
console.log(`Could not load file: '${path}'`);
}
}
});
return icons;
};