File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ async function main() {
213213 return { availableDsfrIconClassNames, availableRemixiconIconClassNames } ;
214214 } ) ( ) ;
215215
216- const usedIconClassNames : string [ ] = [ ] ;
216+ const setUsedIconClassNames = new Set < string > ( ) ;
217217
218218 await Promise . all (
219219 candidateFilePaths . map ( async candidateFilePath => {
@@ -229,16 +229,14 @@ async function main() {
229229 return ;
230230 }
231231
232- usedIconClassNames . push ( className ) ;
232+ setUsedIconClassNames . add ( className ) ;
233233 } ) ;
234234 } )
235235 ) ;
236236
237- return { usedIconClassNames } ;
237+ return { " usedIconClassNames" : Array . from ( setUsedIconClassNames ) } ;
238238 } ) ( ) ;
239239
240- console . log ( "Detected usage of the following icons: " , usedIconClassNames ) ;
241-
242240 const usedIcons = usedIconClassNames . map ( className => {
243241 const icon = icons . find ( ( { prefix, iconId } ) => `${ prefix } ${ iconId } ` === className ) ;
244242
You can’t perform that action at this time.
0 commit comments