[FEATURE] Generate documentation for multiple libraries contained within a monorepo
See original GitHub issueOverview of the feature
It would be nice if there were a way to specify library inputs, maybe through public-api.ts in individual libraries, that would allow for the generated documentation to indicate which library has the associated available content. By this I mean, if I have a monorepo that is namespaced for multiple libraries to be published, it would be helpful if the generated documentation placed all associated functions, variables, components, modules, etc. to a particular library under a single heading, while still allowing the documentation to be combined for all libraries.
Motivation for or Use Case
While there is already a way to generate documentation for multiple apps and for combining the documentation for those apps, there isn’t any real support for documenting multiple publishable libraries.
For example:
projects
- my-lib-1
- something.component.ts
- something.funcs.ts
- my-lib-1.module.ts
- my-other-module.ts
- public-api.ts
- my-lib-2
- something-else.component.ts
- something-else.funcs.ts
- my-lib-2.module.ts
- my-other.funcs.ts
- public-api.ts
As of right now, creating a single tsconfig.compodoc.json file to include these will result in
Modules
- MyLib1Module
- Components
- SomethingComponent
- MyLib2Module
- Components
- SomethingElseComponent
- MyOtherModule
Misc.
- Functions
- something.funcs
- something-else.funcs
- my-other.funcs
There really isn’t a way to determine which library the modules are coming from, especially if there are sub-modules contained within the libraries. Further, there isn’t a clean way of knowing which library contains which functions since they’re all just listed out. A user would have to dig through all of the functions to find the ones that are relevant to the library they’re using.
Ideally, a better solution might be:
Libraries
- my-lib-1
Modules
- MyLib1Module
- Components
- SomethingComponent
- MyOtherModule
Functions/Misc
- something.funcs
- my-lib-2
Modules
- MyLib2Module
- Components
- SomethingElseComponent
Functions/Misc
- something-else.funcs
- my-other.funcs
This allows libraries that are related to be combined into a single set of documentation and also allow for functions to be associated to the appropriate libraries. There is less digging to find what functions are available and how they may work within a given library. And this is even more useful if one of the provided libraries does not necessarily have any angular modules or components and is just a utility library of sorts.
Related issues
No related issues that I’m aware of.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
Sad that this issue is closed. It is a really good idea.
I am facing same problem with an NX monorepo for libraries. As a workaround, I build as many documentation as library. Obviously, it is not very clean, especially because assets are duplicated.
Is there any specific plan for monorepo / workspace use case @vogloblinsky ?
This issue has been automatically closed because it has not had recent activity. Please file a new issue if you are encountering a similar or related problem. Thank you for your contributions.