Skip to content

Generating docs for libs in NX Monorepo #2005

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

Closed
phihochzwei opened this issue Jul 18, 2022 · 4 comments
Closed

Generating docs for libs in NX Monorepo #2005

phihochzwei opened this issue Jul 18, 2022 · 4 comments
Labels
question Question about functionality

Comments

@phihochzwei
Copy link

Search terms

NX, NRWL, Libraries, Monorepo

Question

Hi there. I am trying to create a documentation for 2 Libs inside our NX Monorepo. Here´s how I tried it:

  1. Set typedoc.json to entryPointStrategy "packages"
  2. Pointed the entryPoints to the respective folders "libs/store" and "libs/model"
  3. Inside the respective package.json, I added the entry for "main" to "./src/index.ts"
  4. Added "typedoc": { "entryPoint": "./src/index.ts", "readmeFile": "./README.md", "displayName": "XXX" } like described in the docs to the libs package.jsons

When I try to create the doc, I only receive the error

Error: Entry point "C:\XXX\libs\model\src\index.ts" does not appear to be built by the tsconfig found at "C:/XXX/libs/model/tsconfig.json"

Has anyone an idea what I am missing?

@phihochzwei phihochzwei added the question Question about functionality label Jul 18, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 19, 2022

That error means that libs/model/tsconfig.json specifies the include (or files) option such that the libs/model/src/index.ts file is not included in the program. If the file is included, this is probably a bug and I'll need a reproduction to try to fix it.

@phihochzwei
Copy link
Author

Okay, after I added "srx/index.ts" to the "include" of the respective tsconfig.json´s it is creating the documentation.

However, now I am facing a different problem. I receive the "Warning"

Warning: ModalDTO, defined at libs/model/src/lib/DTO/modal-dto.ts:47, is referenced by @deichmann/store.selectActiveModal but not included in the documentation. and if i check the generated documentation of the entry 'selectActiveModal' (located in 'libs/store') there is no link to the entry of 'ModalDTO' (located in 'libs/model')

Do you any clue on how to fix this?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 19, 2022

#1835, current design limitation.

@phihochzwei
Copy link
Author

Okay, I keep an eye on the other issue. Thanks a lot so far

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