Is there a tool to extract documentation / comments from CommonJS or node.JS modules?

So for example:

/** This is my foo method, it great. */
exports.foo = function(a, b) {
    return a + b;
};

      

It would be great to have something that scans the .js directory of source and build documentation, listing the methods of each module along with their description comments, perhaps an overview comment for an entire module, and looking require

to show dependencies between modules.

+3


source to share


2 answers


I created this tiny tool tonight . This allows you to build something like this using this code as your source.

This is not a fully recognized jsdoc parser, I think all of these completely completely suck because the generated documents are too crappy, flooded with unnecessary structuring.



My tool for flat code, which is like a book, not like a deep tree.

0


source


You should really look into docco . It is intended to describe the "good programming" type of documentation that you describe, and yields very nice documentation from it.



The page I linked you to is for example dcco analysis.

0


source







All Articles