Utilizing docstrings

When you write this

function bar (foo) {
    return foo + foo;
}

If you place your cursor in the line just above function and you write /** when you push « Enter » you’ll be obtain this:

/**
 * [bar description]
 * @param  {[type]} foo Utilizing docstrings
 * @return {[type]}     Utilizing docstrings
 */
function bar (foo) {
    return foo + foo;
}

There are a lot of similary shortcurt.

For example, if you place your cursor after @param {[type]} foo Utilizing docstrings, push « Enter » will create a new a * line, and write @ will propose you (in the intellisense) all JSDoc comments and the validation create a full line.

When your file is correctly documented, just use the jsdoc CLI to create your documentation.

Documentation: https://jsdoc.app/

EDIT: I just realize the response to your question is in your https://github.com/spadgos/sublime-jsdocs link so maybe you want know how generate the documentation so…

Install Node.js and use CLI command

npm install jsdoc -g

Then, supposed file name you want document is foo.js, run the following command:

jsdoc foo.js

This will create a documentation into out directory.

All CLI documentation to generate doc is here : https://jsdoc.app/about-getting-started.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)