@@ -198,7 +198,19 @@ async function generateDocs(
198198    `"mainEntryPointFilePath": "<projectFolder>/dist/esm/index.doc.d.ts"` 
199199  ) ; 
200200
201+   /** 
202+    * Exclude compat as this script is only for modular docgen. 
203+    */ 
204+   const  packageDirectories  =  ( 
205+     await  mapWorkspaceToPackages ( [ `${ projectRoot }  ] ) 
206+   ) . filter ( path  =>  fs . existsSync ( path )  &&  ! path . includes ( '-compat' ) ) ; 
207+ 
201208  try  { 
209+     console . log ( `Deleting old temp directories in each package.` ) ; 
210+     for  ( const  dir  of  packageDirectories )  { 
211+       fs . rmSync ( join ( dir ,  'temp' ) ,  {  recursive : true ,  force : true  } ) ; 
212+     } 
213+ 
202214    fs . writeFileSync ( 
203215      `${ projectRoot }  , 
204216      authApiConfigModified 
@@ -247,13 +259,9 @@ async function generateDocs(
247259
248260  fs . mkdirSync ( tmpDir ) ; 
249261
250-   // TODO: Throw error if path doesn't exist once all packages add markdown support. 
251-   const  apiJsonDirectories  =  ( 
252-     await  mapWorkspaceToPackages ( [ `${ projectRoot }  ] ) 
253-   ) 
254-     . map ( path  =>  `${ path }  ) 
262+   const  apiJsonDirectories  =  packageDirectories 
263+     . map ( path  =>  join ( path ,  'temp' ) ) 
255264    . filter ( path  =>  fs . existsSync ( path ) ) ; 
256- 
257265  for  ( const  dir  of  apiJsonDirectories )  { 
258266    const  paths  =  await  new  Promise < string [ ] > ( resolve  => 
259267      glob ( `${ dir }  ,  ( err ,  paths )  =>  { 
0 commit comments