use correct path to locate icons
This commit is contained in:
@@ -6,7 +6,7 @@ const path = pathModule.default;
|
|||||||
const getDirName = path.dirname;
|
const getDirName = path.dirname;
|
||||||
const glob = globModule.default;
|
const glob = globModule.default;
|
||||||
|
|
||||||
const moduleDirectory = 'src/shared/icon-registry';
|
const moduleDirectory = 'src/packages/core/icon-registry';
|
||||||
const iconsOutputDirectory = `${moduleDirectory}/icons`;
|
const iconsOutputDirectory = `${moduleDirectory}/icons`;
|
||||||
const umbracoSvgDirectory = `${moduleDirectory}/svgs`;
|
const umbracoSvgDirectory = `${moduleDirectory}/svgs`;
|
||||||
const iconMapJson = `${moduleDirectory}/icon-dictionary.json`;
|
const iconMapJson = `${moduleDirectory}/icon-dictionary.json`;
|
||||||
@@ -31,7 +31,7 @@ const collectDictionaryIcons = async () => {
|
|||||||
|
|
||||||
// Lucide:
|
// Lucide:
|
||||||
fileJSON.lucide.forEach((iconDef) => {
|
fileJSON.lucide.forEach((iconDef) => {
|
||||||
if(iconDef.file && iconDef.name) {
|
if (iconDef.file && iconDef.name) {
|
||||||
const path = lucideSvgDirectory + "/" + iconDef.file;
|
const path = lucideSvgDirectory + "/" + iconDef.file;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -90,7 +90,7 @@ const collectDictionaryIcons = async () => {
|
|||||||
|
|
||||||
// Umbraco:
|
// Umbraco:
|
||||||
fileJSON.umbraco.forEach((iconDef) => {
|
fileJSON.umbraco.forEach((iconDef) => {
|
||||||
if(iconDef.file && iconDef.name) {
|
if (iconDef.file && iconDef.name) {
|
||||||
const path = umbracoSvgDirectory + "/" + iconDef.file;
|
const path = umbracoSvgDirectory + "/" + iconDef.file;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -107,8 +107,8 @@ const collectDictionaryIcons = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
icons.push(icon);
|
icons.push(icon);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
console.log(`Could not load file: '${path}'`);
|
console.log(`[Umbraco] Could not load file: '${path}'`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -136,7 +136,7 @@ const collectDiskIcons = async (icons) => {
|
|||||||
const iconName = iconFileName;
|
const iconName = iconFileName;
|
||||||
|
|
||||||
// Only append not already defined icons:
|
// Only append not already defined icons:
|
||||||
if(!icons.find(x => x.name === iconName)) {
|
if (!icons.find(x => x.name === iconName)) {
|
||||||
|
|
||||||
const icon = {
|
const icon = {
|
||||||
name: iconName,
|
name: iconName,
|
||||||
|
|||||||
Reference in New Issue
Block a user