-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docusaurus): bootstrap TypeDoc using API instead of spawnSync to …
…avoid cross-platform issues
- Loading branch information
Showing
10 changed files
with
548 additions
and
933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'docusaurus-plugin-typedoc': patch | ||
--- | ||
|
||
- Bootstrap TypeDoc using API instead of spawnSync to avoid cross-platform issues (#762). |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
packages/docusaurus-plugin-typedoc/src/options/declarations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 46 additions & 1 deletion
47
...s-plugin-typedoc/src/utils/get-sidebar.ts → ...urus-plugin-typedoc/src/plugin/sidebar.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Export as cjs to be compatible with esm | ||
*/ | ||
module.exports = { | ||
bootstrap: async (options, postRenderCallbackFn) => { | ||
const typedoc = await import('typedoc'); | ||
|
||
const app = await typedoc.Application.bootstrapWithPlugins(options, [ | ||
new typedoc.TypeDocReader(), | ||
new typedoc.PackageJsonReader(), | ||
new typedoc.TSConfigReader(), | ||
]); | ||
|
||
app.renderer.postRenderAsyncJobs.push(postRenderCallbackFn); | ||
|
||
const project = await app.convert(); | ||
|
||
// if project is undefined typedoc has a problem - error logging will be supplied by typedoc. | ||
if (!project) { | ||
return; | ||
} | ||
|
||
if (options.watch) { | ||
app.convertAndWatch(async (project) => { | ||
await app.generateOutputs(project); | ||
}); | ||
} else { | ||
await app.generateOutputs(project); | ||
} | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.