I need a NodeJS based generator that takes as input a JavaScript file and generate markdown documentation.


 * foo
 * foo description
 * @name foo
 * @param {String} a Some description
 * @param {Object} b An object param
 * @return {Boolean} Some foo again
function foo (a, b) {
   /* do something */
   return Boolean(...);

The result will be something like this:

## foo (a, b)
foo description
  - `a` (String): Some description
  - `b` (Object): An object param
Returns (Boolean) Some foo again

I'm not sure it generates exactly the output you're looking for (and that might be hard to find), but JSDoc follows your other needs: JS doc generator, in node.js.

| improve this answer | |

I'm not sure there is a program that directly generates markdown doc. Until somebody makes it, you can generate a html doc that's as simple as possible and then convert it to markdown. Here's a tool to do the conversion


| improve this answer | |

Based on markdox library, I created a command line tool named blah that does this task.

To install it do:

$ npm install -g blah

To generate a markdown documentation for a js file:

$ blah docs your-file.js

This will create DOCUMENTATION.md file. For more information check out the blog post and the GitHub repository.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.