Skip to content

Commit 126d0f5

Browse files
authored
V16: Moves icon dependencies to 'core' package.json (#20041)
* build(deps-dev): moves icon dependencies to 'core' package + upgrades them to latest * chore: regenerates icons * chore(eslint): fixes eslint warnings
1 parent 28b90bc commit 126d0f5

File tree

17 files changed

+2622
-3386
lines changed

17 files changed

+2622
-3386
lines changed

src/Umbraco.Web.UI.Client/devops/icons/index.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/* eslint-disable local-rules/enforce-umbraco-external-imports */
12
import { readFileSync, writeFile, mkdir, rmSync } from 'fs';
2-
import * as globModule from 'tiny-glob';
33
import * as pathModule from 'path';
4+
import * as globModule from 'tiny-glob';
45
import { optimize } from 'svgo';
56

67
const path = pathModule.default;
@@ -23,7 +24,7 @@ const run = async () => {
2324
// Empty output directory:
2425
rmSync(iconsOutputDirectory, { recursive: true });
2526

26-
var icons = await collectDictionaryIcons();
27+
let icons = await collectDictionaryIcons();
2728
icons = await collectDiskIcons(icons);
2829
writeIconsToDisk(icons);
2930
generateJS(icons);
@@ -59,7 +60,7 @@ const collectDictionaryIcons = async () => {
5960
};
6061

6162
icons.push(icon);
62-
} catch (e) {
63+
} catch {
6364
errors.push(`[Lucide] Could not load file: '${path}'`);
6465
console.log(`[Lucide] Could not load file: '${path}'`);
6566
}
@@ -91,7 +92,7 @@ const collectDictionaryIcons = async () => {
9192
};
9293

9394
icons.push(icon);
94-
} catch (e) {
95+
} catch {
9596
errors.push(`[SimpleIcons] Could not load file: '${path}'`);
9697
console.log(`[SimpleIcons] Could not load file: '${path}'`);
9798
}
@@ -117,7 +118,7 @@ const collectDictionaryIcons = async () => {
117118
};
118119

119120
icons.push(icon);
120-
} catch (e) {
121+
} catch {
121122
errors.push(`[Umbraco] Could not load file: '${path}'`);
122123
console.log(`[Umbraco] Could not load file: '${path}'`);
123124
}
@@ -171,11 +172,9 @@ const writeIconsToDisk = (icons) => {
171172

172173
writeFileWithDir(icon.output, content, (err) => {
173174
if (err) {
174-
// eslint-disable-next-line no-undef
175175
console.log(err);
176176
}
177177

178-
// eslint-disable-next-line no-undef
179178
//console.log(`icon: ${icon.name} generated`);
180179
});
181180
});
@@ -192,18 +191,18 @@ const generateJS = (icons) => {
192191
${icon.legacy ? 'legacy: true,' : ''}
193192
${icon.hidden || icon.legacy ? 'hidden: true,' : ''}
194193
path: () => import("./icons/${icon.fileName}.js"),
195-
}`.replace(/\t/g, '').replace(/^\s*[\r\n]/gm, ''); // Regex removes white space [NL] // + regex that removes empty lines. [NL]
194+
}`
195+
.replace(/\t/g, '') // Regex removes white space [NL]
196+
.replace(/^\s*[\r\n]/gm, ''); // Regex that removes empty lines. [NL]
196197
});
197198

198199
const content = `export default [${iconDescriptors.join(',')}];`;
199200

200201
writeFileWithDir(JSPath, content, (err) => {
201202
if (err) {
202-
// eslint-disable-next-line no-undef
203203
console.log(err);
204204
}
205205

206-
// eslint-disable-next-line no-undef
207206
console.log('Icons outputted and Icon Manifests generated!');
208207
});
209208
};

src/Umbraco.Web.UI.Client/package-lock.json

Lines changed: 41 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Umbraco.Web.UI.Client/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,14 @@
242242
"eslint-plugin-storybook": "9.0.14",
243243
"eslint-plugin-wc": "^2.2.1",
244244
"globals": "^16.3.0",
245-
"lucide-static": "^0.539.0",
246245
"madge": "^8.0.0",
247246
"msw": "^1.3.5",
248247
"playwright-msw": "^3.0.1",
249248
"postcss": "^8.5.6",
250249
"postcss-cli": "^11.0.1",
251250
"prettier": "3.6.2",
252251
"remark-gfm": "^4.0.1",
253-
"simple-icons": "^14.15.0",
254252
"storybook": "9.0.14",
255-
"svgo": "^3.3.2",
256253
"tiny-glob": "^0.2.9",
257254
"tsc-alias": "^1.8.16",
258255
"typedoc": "^0.28.10",

0 commit comments

Comments
 (0)