@@ -66,7 +66,7 @@ function checkIcons() {
6666 console . time ( END ) ;
6767
6868 const iconIds = { } ;
69- const iconIdParts = { } ;
69+ const iconIdPartsObj = { } ;
7070
7171 globSync ( `./icons/**/*.svg` ) . forEach ( file => {
7272 const contents = readFileSync ( file , 'utf8' ) ;
@@ -86,8 +86,10 @@ function checkIcons() {
8686 process . exit ( 1 ) ;
8787 }
8888 iconIds [ id ] = true ;
89- const parts = id . split ( / _ w i t h _ | _ o n _ | _ i n _ | _ o n t o _ | _ i n t o _ | _ a n d _ | _ f o r _ | _ u n d e r _ | _ o v e r _ | _ a b o v e _ | _ b e t w e e n _ | _ a t o p _ | _ w i t h i n _ | _ t o w a r d _ | _ w e a r i n g _ | _ h o l d i n g _ | _ c a r r y i n g _ | _ b e s i d e _ / ) ;
90- if ( parts [ 0 ] !== id ) parts . forEach ( part => iconIdParts [ part ] = true ) ;
89+ const parts = id . split ( / _ w i t h _ | _ o n _ | _ i n _ | _ o n t o _ | _ i n t o _ | _ a n d _ | _ u n d e r _ | _ o v e r _ | _ a b o v e _ | _ b e s i d e _ | _ b e t w e e n _ | _ a t o p _ | _ w i t h i n _ | _ f r o m _ | _ t o _ | _ t o w a r d _ | _ w e a r i n g _ | _ h o l d i n g _ | _ c a r r y i n g _ | _ c r o s s i n g _ | _ d r a g g i n g _ | _ a i m i n g _ | _ b o a r d i n g _ | _ r i d i n g _ | _ d r i v i n g _ | _ u s i n g _ / ) ;
90+ // if (parts[0] !== id) {
91+ // parts.forEach(part => iconIdPartsObj[part] = true);
92+ // }
9193
9294 // Make xml declaration consistent
9395 xml . dec ( { version : '1.0' , encoding : 'UTF-8' } ) ;
@@ -226,12 +228,11 @@ function checkIcons() {
226228
227229 } ) ;
228230
229- Object . keys ( iconIdParts )
230- . sort ( )
231- . filter ( part => ! iconIds [ part ] )
232- . forEach ( part => console . log ( `Missing base icon "${ part } "` ) ) ;
233-
234- console . log ( `Missing ${ Object . keys ( iconIdParts ) . length } base icons total` ) ;
231+ // const iconIdParts = Object.keys(iconIdPartsObj).sort();
232+ // iconIdParts
233+ // .filter(part => !iconIds[part])
234+ // .forEach(part => console.log(`Missing icon part "${part}"`));
235+ // console.log(`Missing base icons for ${iconIdParts.filter(part => !iconIds[part]).length} parts of ${iconIdParts.length} parts total`);
235236
236237 console . timeEnd ( END ) ;
237238}
0 commit comments