File tree Expand file tree Collapse file tree 2 files changed +171
-454
lines changed
src/Umbraco.Web.UI.Client
src/packages/core/icon-registry Expand file tree Collapse file tree 2 files changed +171
-454
lines changed Original file line number Diff line number Diff line change @@ -138,9 +138,11 @@ const collectDiskIcons = async (icons) => {
138
138
139
139
// Only append not already defined icons:
140
140
if ( ! icons . find ( ( x ) => x . name === iconName ) ) {
141
+ // remove legacy for v.17 (Deprecated)
141
142
const icon = {
142
143
name : iconName ,
143
144
legacy : true ,
145
+ hidden : true ,
144
146
fileName : iconFileName ,
145
147
svg,
146
148
output : `${ iconsOutputDirectory } /${ iconFileName } .ts` ,
@@ -173,11 +175,13 @@ const generateJS = (icons) => {
173
175
const JSPath = `${ moduleDirectory } /icons.ts` ;
174
176
175
177
const iconDescriptors = icons . map ( ( icon ) => {
178
+ // remove legacy for v.17 (Deprecated)
176
179
return `{
177
180
name: "${ icon . name } ",
178
181
${ icon . legacy ? 'legacy: true,' : '' }
182
+ ${ icon . hidden ? 'hidden: true,' : '' }
179
183
path: () => import("./icons/${ icon . fileName } .js"),
180
- }` . replace ( / \t / g, '' ) ; // Regex removes white space [NL]
184
+ }` . replace ( / \t / g, '' ) . replace ( / ^ \s * [ \r \n ] / gm , '' ) ; // Regex removes white space [NL] // + regex that removes empty lines. [NL]
181
185
} ) ;
182
186
183
187
const content = `export default [${ iconDescriptors . join ( ',' ) } ];` ;
You can’t perform that action at this time.
0 commit comments