1.1.5 • Published 8 years ago

express-doc-gen v1.1.5

Weekly downloads
49
License
MIT
Repository
bitbucket
Last release
8 years ago

express-doc-gen

A module I made for my own use that gets all routes in an express app and creates documentation for them using a template and a json file to specify parameters and descriptions. This probably won't ever be updated.

Installation

npm install express-doc-gen --save

Use

const docGen = require('express-doc-gen');

var options = {
  template,// - optional (uses default template if not specified) -- path to custom template
  docInfo,// - optionish (populates with test one if not specified) -- path to docInfo.json
  docPath// - optional (uses __dirname/documentation if not specified) -- folder to store documentation in
};
docGen.generate(app, options)
  .then(function(routes) {
    console.log('Detected routes: ' + JSON.stringify(routes));
  });

Tests

npm install
npm test
> express-doc-gen@1.0.0 test /var/www/html/ide/workspace/express-doc-gen
> mocha tests/*Test.js
  Generate docs
    ✓ should return an array with two routes
  1 passing (29ms)

Dependencies

  • mkdirp: Recursively mkdir, like mkdir -p
  • q: A library for promises (CommonJS/Promises/A,B,D)

Dev Dependencies

  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • express: Fast, unopinionated, minimalist web framework
  • mocha: simple, flexible, fun test framework

License

MIT

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago