Angular V2+ code documentation with Compodoc
Not a simple documentation tool
NGCli is amazing but it still needs something more to be perfect. I was wondering if there is something about code documentation with Angular and I have found a couple of libraries very easily.
Compodoc is very easy to find on Google. I have tried it and I like it. You can install it globally with npm and start generating and covering documentation for your application. You can also visit the repository on Github and read its own documentation. It's simple to use and what it generates is very powerful:
- Code documentation and coverage
- UML and diagrams about Components, directives, variables, services and more...
- See number of components, services, routes and more...
- You can show the source code
# Install compodoc with npm
npm install -g @compodoc/compodoc
# Run compodoc in your project and serve it
compodoc src -s
# If you are using NGCli
compodoc -p src/tsconfig.json -s
# For the most recent version of NGCli:
compodoc -p src/tsconfig.app.json -s
This tool is highly recommended for all of these amazing features and for having a good documentation always available for every developer.
Typedoc is another open source documentation tool for Typescript projects. It's very easy to use but Compodoc is much better for Angular applications.
Feel free to try this tool. Actually I still prefer Compodoc.