Gorakh Nath
Gorakh Nath

Reputation: 9838

How to generate document using Jsdoc in reactjs?

I have install the Jsdoc in my solution with the help of command npm install jsdoc. Now in method I have defined with the comment as:-

/**
 * @param {object} state person/thing you want to say hello to.
 * @param {object} action
 * @returns {object} state
 */

Now the question is how can I generate the document?, what will be the command to generate the document?

Upvotes: 2

Views: 747

Answers (1)

Horst Brack
Horst Brack

Reputation: 153

First of all, you may have a look at the documentation. It is a bit confusing at first but quite comprehensive.

Then, I would recommend to install jsdocs globally with npm -g

Now you can go to your project folder and just type

jsdoc src -r -d docs

This will go through all files in the subdirectory src and output the documentation in docs.

Upvotes: 3

Related Questions