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

0.5.6 version pulling in extra files #421

Closed
gregvanl opened this issue Feb 15, 2017 · 4 comments
Closed

0.5.6 version pulling in extra files #421

gregvanl opened this issue Feb 15, 2017 · 4 comments
Labels
bug Functionality does not match expectation help wanted Contributions are especially encouraged

Comments

@gregvanl
Copy link

When running typedoc with a single file, the 0.5.6 version is now pulling in all .d.ts files in the project. This was not the behavior in 0.5.5 and might be due to the recent change around the --exclude switch 6ddb7f5.

@aciccarello aciccarello added bug Functionality does not match expectation help wanted Contributions are especially encouraged labels Feb 15, 2017
@aciccarello
Copy link
Collaborator

Yes, there was a bug in #387 which makes the exclude option required. As was noted on 6ddb7f5, you can workaround this by adding a dummy --exclude xx. Thanks for submitting an issue for this. PRs are welcome.

@jason0x43
Copy link
Contributor

When you say 0.5.6 is pulling in all the .d.ts files, do you mean that docs are being generated for .d.ts files?

@gregvanl
Copy link
Author

Yes, our .json file which included generated types for one TypeScript .d.ts file went from 713K to 13M when all the node_modules TypeScript .d.ts files where pulled in. No change in the project, just an upgrade from TypeDoc 0.5.5 to 0.5.6.

@jason0x43
Copy link
Contributor

Hmmm...at a guess I'd say the issue is probably due to the addition of directoryExists to TypeDoc's CompilerHost class. This allows the TypeScript compiler's automatic type discovery to work, which will find types in node_modules/@types by default. If you're using --includeDeclarations, that could cause all the discovered types to be documented.

Try using a combination of --externalPattern and --excludeExternals to prevent docs being generated for those files while still allowing them to be used by the TS compiler during the generation process. I've been doing something like --externalPattern '**/+(node_modules|tests|typings)/**/*.ts' --excludeExternals.

@Gerrit0 Gerrit0 closed this as completed Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

4 participants