Skip to content

Commit

Permalink
fix(core): correctly handle typedoc executable in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jan 18, 2025
1 parent 9c37d55 commit 10bccd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/quick-masks-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'docusaurus-plugin-typedoc': patch
---

- Correctly handle typedoc executable in Windows (#762).
5 changes: 4 additions & 1 deletion packages/docusaurus-plugin-typedoc/src/plugins/docusaurus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ async function generateTypedoc(context: any, opts: Partial<any>) {
const { plugin, ...options } = getPluginOptions(context, opts);

// spawn typedoc process and pass docusaurus.config options as a string

const typedocExecutable = process.platform === 'win32' ? 'typedoc.cmd' : 'typedoc';

spawnSync(
'typedoc',
typedocExecutable,
[
...plugin.flatMap((plugin) => ['--plugin', plugin]),
'--docusaurusConfigOptions',
Expand Down

0 comments on commit 10bccd8

Please sign in to comment.