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

multiple entry points inside monorepo #2138

Closed
dreamorosi opened this issue Jan 7, 2023 · 2 comments
Closed

multiple entry points inside monorepo #2138

dreamorosi opened this issue Jan 7, 2023 · 2 comments
Labels
question Question about functionality

Comments

@dreamorosi
Copy link

Search terms

monorepo, multiple entry points

Question

I have the following package structure:

my-repo/
├─ packages/
│  ├─ logger/
│  │  ├─ src/
│  │  │  ├─ index.ts
│  ├─ metrics/
│  │  ├─ src/
│  │  │  ├─ index.ts
│  ├─ parameters/
│  │  ├─ src/
│  │  │  ├─ foo/
│  │  │  │  ├─ index.ts
│  │  │  ├─ bar/
│  │  │  │  ├─ index.ts
│  │  │  ├─ index.ts

and the following typedoc.js:

module.exports = {
  out: 'api',
  exclude: [ '**/node_modules/**', '**/*.test.ts', '**/*.json' ],
  entryPointStrategy: 'packages',
};

This setup generates correctly the docs for packages/logger and packages/metrics because their only entry point is packages/*/src/index.ts and everything is exported there.

On the other hand, for various reasons, the third package in the npm workspace packages/parameters has multiple entrypoints:

  • packages/parameters/src/index.ts
  • packages/parameters/src/foo/index.ts
  • packages/parameters/src/bar/index.ts

However I cannot get typedoc to pick up all of them and I cannot seem to find a way to do so from the docs.

Is there any way for me to have the docs to include the contents of packages/parameters/src/foo/index.ts and packages/parameters/src/bar/index.ts without explicitly exporting them in packages/parameters/src/index.ts?

Thanks

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 7, 2023

Today, multiple entry points are not supported for packages in packages mode. #1937

In 0.24, packages mode will essentially be running TypeDoc several times for each package, then merging them together, so this will be pretty easy then.

@dreamorosi
Copy link
Author

I see.

Thank you for the quick answer on this.

Looking forward to version 0.24 then.

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