@@ -470,14 +470,14 @@ async function main() {
470470 await rm ( nextCacheDir , { "recursive" : true , "force" : true } ) ;
471471 } ;
472472
473+ console . log ( { dsfrDistInPublicDirPath } ) ;
474+
473475 [ dsfrDistInNodeModulesDirPath , dsfrDistInPublicDirPath ]
474476 . filter ( exclude ( undefined ) )
475477 . forEach ( async dsfrDistDirPath => {
476- const cssFilePaths = [ "icons.css" , "icons.min.css" ] . map ( cssFileBasename =>
477- pathJoin ( dsfrDistDirPath , "utility" , "icons" , cssFileBasename )
478- ) ;
478+ const cssFilePath = pathJoin ( dsfrDistDirPath , "utility" , "icons" , "icons.min.css" ) ;
479479
480- if ( cssFilePaths . some ( cssFilePath => ! fs . existsSync ( cssFilePath ) ) ) {
480+ if ( ! fs . existsSync ( cssFilePath ) ) {
481481 return ;
482482 }
483483
@@ -497,19 +497,17 @@ async function main() {
497497 )
498498 ) ;
499499
500- cssFilePaths . forEach ( async filePath => {
501- log ?. ( `Patching ${ pathRelative ( projectDirPath , filePath ) } ` ) ;
500+ log ?. ( `Patching ${ pathRelative ( projectDirPath , cssFilePath ) } ` ) ;
502501
503- const currentCode = await readFile ( filePath ) ;
502+ const currentCode = await readFile ( cssFilePath ) ;
504503
505- if ( Buffer . compare ( rawIconCssCodeBuffer , currentCode ) === 0 ) {
506- return ;
507- }
504+ if ( Buffer . compare ( rawIconCssCodeBuffer , currentCode ) === 0 ) {
505+ return ;
506+ }
508507
509- onConfirmedChange ( ) ;
508+ onConfirmedChange ( ) ;
510509
511- writeFile ( filePath , rawIconCssCodeBuffer ) ;
512- } ) ;
510+ writeFile ( cssFilePath , rawIconCssCodeBuffer ) ;
513511 } ) ;
514512}
515513
0 commit comments