Finally, I found a tool that solves this problem: JSDoc.app
JSDoc 3 is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor. You add documentation comments directly to your source code, right alongside the code itself. The JSDoc tool will scan your source code and generate an HTML documentation website for you.
After reading their setup instructions, I was able to do the following steps:-
- Open your command prompt
- Install the JSDoc globally by command: npm install jsdoc -g
- Now go to your project folder’s path and run the command: jsdoc src -r -d docs
This created the HTML documentation in the out/
folder of the project directory.