typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
725 stars 177 forks source link

[typedoc-plugin-markdown@next] Packages mode replaces module.index.md in the root output for each package #528

Closed adambergman closed 11 months ago

adambergman commented 11 months ago

When using the packages entry point strategy in typedoc and with the outputFileStrategy option set to modules it appears that the plugin is writing the module.index.md file for each package in the root output directory instead of in each package's subdirectory.

In the example repo below (taken from the typedoc documentation), run npm run docs. The packages "bar" and "baz" should generate their own module.index.md file in their respective directories, but it appears they are each generating their file in the parent folder (root output directory), overwriting the previous one if it exists. After the generation is complete, the module.index.md file will contain the content of whichever package was parsed last.

Expected Result: docs/@typedoc/bar/module.index.md - generated doc for /packages/bar/index.ts docs/@typedoc/baz/module.index.md - generated doc for /packages/baz/index.ts docs/@typedoc/module.index.md - no file should exist

Actual Result: docs/@typedoc/bar/module.index.md - does not exist docs/@typedoc/baz/module.index.md - does not exist docs/@typedoc/module.index.md – exists and will be the content of the last package parsed (packages/baz/index.ts).

https://github.com/adambergman/typedoc-plugin-markdown-packages-module-index

tgreyuk commented 11 months ago

Thanks again for detailed description. Fix in typedoc-plugin-markdown@4.0.0-next.38.

adambergman commented 11 months ago

Works perfectly, thanks @tgreyuk