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
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.
moduleexports = power: power { // this function won't be documented because starts with "_"} /** * Give me some power! * * @param * @param * @return */ { return Math;}
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.