Options to generate javascript library documentation

Asked

Viewed 1,118 times

5

Currently I have used much the jsdoc3 with the docstrap, however requires a large amount of third party libraries to generate documentation with node and grunt, someone knows a robust alternative (which has an equal or even better specification level and which contains fewer dependencies for documentation generation)?

2 answers

3


There are some other libraries that generate documentation from javascript code other than jsdoc3, but most will require you to configure the environment to make it work. Take into account that in addition to reading the source code, a library with this function would have to save many files from the final documentation, and this is quite complicated to do with pure Javascript within a browser or using only a file. bat or . sh.

I personally prefer jsdoc3, but if you really want to test other alternatives (which I personally haven’t tested but I know there are), follow a list

2

I use and recommend the http://yui.github.io/yuidoc is very easy to use and quite complete.

It generates documentation from the comments in the code, in a format similar to Jsdoc:

Classes

/**
* Descrição da classe.
*
* @class MinhaClasse
* @constructor
*/

Methods

/**
* Descrição do método.  Como qualquer outro comentário,
* podem ocorrer quebras de linha sem problema.
*
* @method nomeMetodo
* @param {String} foo Parâmetro 1
* @param {Object} config Objeto de configuração
* @param {String} config.name Nome do objeto de config
* @param {Function} config.callback Callback do objeto de configuração
* @param {Boolean} [extra=false] Parâmetro extra, opcional
* @return {Boolean} Retorna true se bem sucedido
*/

To generate the documentation, just run yuidoc <camindo de entrada>.
For more options, see the documentation in English.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.