Option to auto generate docs from dumb component libraries to increase the discoverability of the shared modules. You can see a generated doc example here: http://ui.sportngin.com/
My team was able to do this pretty easily using Compodoc.
Compodoc reads your entire Angular app without actually compiling the source. Just create a new tsconfig.json at the root level of your project and be sure to use the following...
{
...
"include": [
"apps/**/*.ts",
"libs/**/*.ts"
]
...
}
Then you can run compodoc -p ./tsconfig.compodoc.json and easily create living docs related to your Nx workspace.
I have added a special paragraph in the documentation about this use-case : https://compodoc.github.io/website/guides/tips-and-tricks.html#documentation-of-several-apps-in-a-monorepository
using alias paths in the application seems this is not working
example :
in app.module.ts
import { productModule } from "@eshop/product"
in tsconfig.compdoc.ts:
"paths": {
"@eshop/product" : ["libs/product/src/index.ts"]
}
I get the error :
<rejected> { Error: File not found: C:/git-projects/online-shop/frontend/apps/eshop/src/app/@eshop/product.ts
@FadiNouh1 Compodoc doesn't support that right now, sorry..
@vogloblinsky it seems the nx demo you point to in the compodoc docs has changed and no longer includes compodoc.
It seems Compodoc yet to implement notion of NX application and library. Is there any effort in this direction? I'd like to contribute, but don't know if I should start it by myself or join somebody to help.
Closing this issue as we now have storybook support and also there is a plugin for compodoc. :tada:
@FrozenPandaz I can't find the compodoc plugin, do you have a link you could add?
Here's a link to the community plugin:
https://github.com/twittwer/nx-tools/tree/master/libs/compodoc#readme
There's also a full list of community plugins that you can find here!
@FrozenPandaz excuse me if this is a stupid question, how can I add this plugin on a v8 workspace?
Here's a link to the community plugin:
https://github.com/twittwer/nx-tools/tree/master/libs/compodoc#readme
There's also a full list of community plugins that you can find here!
I got this error with Angular 10 and @nrwl 10.
node_modules/viz.js/viz.js:33 Invalid asm.js: Function definition doesn't match use
Here's a link to the community plugin:
https://github.com/twittwer/nx-tools/tree/master/libs/compodoc#readme
There's also a full list of community plugins that you can find here!
https://nx.dev/nx-communityI got this error with Angular 10 and @nrwl 10.
node_modules/viz.js/viz.js:33 Invalid asm.js: Function definition doesn't match use
I think this is an issue with the viz library. if you don't need html view, you can use nx run <project>:compodoc:json
Most helpful comment
My team was able to do this pretty easily using Compodoc.
Compodoc reads your entire Angular app without actually compiling the source. Just create a new
tsconfig.jsonat the root level of your project and be sure to use the following...Then you can run
compodoc -p ./tsconfig.compodoc.jsonand easily create living docs related to your Nx workspace.