As developer or software engineer, we always pride ourselves to create code and useful automation and do things effectively and efficiently.
Documentation is not always a fav subject because we get to do lesser code and require alot laborious human writing and effort. However, documentation is necessary for its intrinsic and business value to function as a delivery team unit.


Compodoc can be our documentation-savior for angular.
It will give you good visualization of documentations , visualizations,diagrams and coverages in a neat html format.


git clone --branch feature/documentation https://github.com/seanlon/demo-angular-app/

Let’s start!

First we install

   
npm i --save compodoc && 
npm i -g compodoc

After we installed,verify

 
compodoc --version

After we verify, configure in package.json

 
 "doc": "compodoc -p src/tsconfig.app.json && compodoc -s",

After we configured in package.json, we run

 
npm run doc

After we run , check the generated doc site. The local folder offline copy also will be generated in /documentation folder.
It is beautiful, and we can customize theme too.

  

After we run , check the generated doc site for coverage.

  

To improve coverage, we need to comment at class-level, function-level and property-level description.

  

Run again the command.

Finally we have good coverage. You can share good news to your business team !

  

If you like more , please share and comment. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *