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

Ignore a whole module in the generated doc #842

Closed
amaury1093 opened this issue Aug 21, 2018 · 9 comments
Closed

Ignore a whole module in the generated doc #842

amaury1093 opened this issue Aug 21, 2018 · 9 comments
Labels
help wanted Contributions are especially encouraged

Comments

@amaury1093
Copy link

Here's myModule.ts:

/**
 * @hidden
 * @ignore
 * @internal
 */

/**
 * Some comment.
 *
 * @ignore
 */
const myFunction = () => {};

When I run typedoc on it, I still see myModule in the list of modules on the right.

My typedoc.js:

module.exports = {
  exclude: ['**/*spec.ts', '**/index.ts'],
  excludeExternals: true,
  excludeNotExported: true,
  excludePrivate: true,
  hideGenerator: true,
  includes: './src',
  out: 'docs',
  module: 'commonjs',
  stripInternal: 'true'
};

@aciccarello aciccarello added enhancement Improved functionality help wanted Contributions are especially encouraged Priority: 2 labels Aug 21, 2018
@BenDevelopment
Copy link

I'm looking for the same behavior. Did you find a solution @amaurymartiny ?

@igncp
Copy link
Contributor

igncp commented Mar 5, 2019

I've tried to replicate this issue today with this setup but haven't been able. Both @internal and @hidden tags (individually or combined) on top of the file would hide it from the globals menu. Using the same typedoc.js file as the initial comment. Tried with the latest version and 0.12.0.

Would any of you have more info about the environment (OS, typedoc version, dir structure, ...) or a repo where this is happening? I could take a look

@amaury1093
Copy link
Author

@igncp Look at the am-docs branch of https://github.com/maxogden/menubar/tree/am-docs/.

Specifically:

  • yarn docs generates docs (typedoc 0.14.2), outputs into the docs/ folder
  • here we see "util/cleanOptions", and its docs are generated
  • while I insistingly tried to hide them here

@SimonFarrugia
Copy link

@amaurymartiny Same issue here. Just add another comment block after it, and it works fine.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 26, 2019

I suspect this was fixed in some commit to TypeDoc after the original report but the issue didn't get closed alongside it.

Since if you are not familiar with TypeDoc's behavior it won't make much sense, I've opened #1080 to track adding a warning for the case of a module documentation comment used with import statements.

@Gerrit0 Gerrit0 closed this as completed Jul 26, 2019
@Dzenly
Copy link

Dzenly commented Oct 9, 2019

Is there a way to ignore the whole module without adding @ignore to all exported stuff?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Oct 12, 2019

As discussed above, you should be able to just add @ignore to the doc comment for the module. If this doesn't work for you, please open an issue.

@Dzenly
Copy link

Dzenly commented Oct 13, 2019

Done: #1113

@millsp
Copy link

millsp commented Dec 11, 2019

Just to recap what worked for me. If you want to exclude a whole file (from the menu, search...), at the top of your file you should add:

/** @ignore *//** */

It is hacky and I'd love to see this fixed. Unfortunately, it does not work for me without /** */ (on [email protected], ubuntu 18.04, nodejs 12.13.1).

(like @SimonFarrugia suggested above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

8 participants