Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to prevent modules from being documented, while keeping their classes? #1526

Closed
felipecrs opened this issue Mar 4, 2021 · 3 comments
Closed
Labels
question Question about functionality

Comments

@felipecrs
Copy link

felipecrs commented Mar 4, 2021

In the past, --mode files had this effect. Now, I can't make this work, I tried to hide (with @hidden) all my modules, but that stop their classes from being documented as well.

I checked the 0.20 release notes for the --mode removal, but I couldn't find any help there also.

References #1470, which had no response.

@Gerrit0 Gerrit0 added the question Question about functionality label Mar 5, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 5, 2021

You're running TypeDoc with configuration like this:

{
  "inputFiles": ["src"]
}

When you do this, TypeDoc will expand that directory into an array of entry points and then document each entry point's exports, resulting in documentation for all of your modules.

However, if you pass TypeDoc a single entry point, then it will only document what has been exported from that file, giving documentation for just those exports under your project. This is how TypeDoc's config is set up.

This is good enough for most usage, and is what you should use if you are generating docs for a library, but if you are documenting an application's classes without creating a single file that exports what you want to document, then you'll likely want to use typedoc-plugin-merge-modules.

@felipecrs
Copy link
Author

felipecrs commented Mar 5, 2021

Thank you so much for the response, @Gerrit0.

I indeed use a folder as my entryPoints. However, my src/index.ts is pointless for a configuration perspective, so I want the documentation for all the other files (that's why I use src as my folder). Nonetheless, in my case, generating the modules documents is also pointless, as it's just a reference for my Classes, which actually contains meaningful information that I want documented.

https://github.com/felipecrs/megatar
https://gitpod.io/#https://github.com/felipecrs/megatar
https://felipecrs.com/megatar (currently generated with TypeDoc 0.19.0)

I'm gonna play with the plugin you said. Thanks!

@felipecrs
Copy link
Author

The plugin does exactly what I wanted, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about functionality
Projects
None yet
Development

No branches or pull requests

2 participants