-
Notifications
You must be signed in to change notification settings - Fork 0
Jsdoc
RupaliM edited this page Oct 3, 2018
·
2 revisions
Documenting JavaScript with Jsdoc
- Install NPM /Node.js which comes with npm.
- Install JsDoc by typing the following command (npm install -g jsdoc.)
- Comment your code according to your need and refer js.documentation.
- Go to destination folder cd (your path) src folder
- Run Js-Doc / generate documentation. jsdoc -d ../doc js/
Block tags, which are at the top level of a JSDoc comment. Inline tags, which are within the text of a block tag or a description.
1.Block and inline tags in JSDoc comments
/**
* Set the shoe's color. Use {@link Shoe#setSize} to set the shoe size.
*
* @param {string} color - The shoe's color.
*/
-
Inline tag used within a block tag
/**
* Set the shoe's color.
*
* @param {SHOE_COLORS} color - The shoe color. Must be an enumerated
* value of {@link SHOE_COLORS}.
*/
-
Multiple block tags separated by line breaks
/**
* Set the color and type of the shoelaces.
*
* @param {LACE_COLORS} color - The shoelace color.
* @param {LACE_TYPES} type - The type of shoelace.
*/