0.0.6 • Published 6 years ago

docr v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

docr

Small javascript to markdown documentation tool

usage

npm install -g docr

docr file|pattern [ file|pattern] [--prepend file] [--append file] [--intro]
  pattern    Linux will expand wildcards so remember to escape
             them "\*"
  prepend    can be repeated many times
  append     can be repeated many times
  intro      if the file has an intro (comment at the very
             beginning of the file) it will be used

Documentation will be printed to stdout.

examples

# multiple files
docr index.js lib/xxx.js

# globbing support
docr lib/*

File compatibility

docr is very simple. Do not support prototype or even objects. It's made some modules i have that has recursive require(s).

As you may know, when you have recursive require the easiest way to solve it is to write you module like this.

module.exports = {
    power: power
}

function _private_function() {
    // this function won't be documented because starts with "_"
}

/**
 * Give me some power!
 *
 * @param {Number} a
 * @param {Number} b
 * @return {Number}
 */
function power(a, b) {
    return Math.power(a, b);
}

docr will generate documentation for any function that has a doc-block. To be coherent function name must be the same as exports.

jsDoc support.

  • description
  • @param
  • @note
  • @return
  • @example (partial support)

new

  • @name String

    Force the function name in the documentation.

projects that use docr

0.0.6

6 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.2

9 years ago

0.0.1

10 years ago