File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,19 @@ async function generateDocs(
198198 `"mainEntryPointFilePath": "<projectFolder>/dist/esm/index.doc.d.ts"`
199199 ) ;
200200
201+ // TODO: Throw error if path doesn't exist once all packages add markdown support.
202+ const apiJsonDirectories = (
203+ await mapWorkspaceToPackages ( [ `${ projectRoot } /packages/*` ] )
204+ )
205+ . map ( path => `${ path } /temp` )
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 apiJsonDirectories ) {
211+ fs . rmSync ( dir , { recursive : true , force : true } ) ;
212+ }
213+
202214 fs . writeFileSync (
203215 `${ projectRoot } /packages/auth/api-extractor.json` ,
204216 authApiConfigModified
@@ -247,13 +259,6 @@ 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 } /packages/*` ] )
253- )
254- . map ( path => `${ path } /temp` )
255- . filter ( path => fs . existsSync ( path ) ) ;
256-
257262 for ( const dir of apiJsonDirectories ) {
258263 const paths = await new Promise < string [ ] > ( resolve =>
259264 glob ( `${ dir } /*.api.json` , ( err , paths ) => {
You can’t perform that action at this time.
0 commit comments