node package manager


Api documentation generator

bees (in Italian API means bees)

Let the code write your docs D:

$ npm install bees

See test/file

You can extend Bees and add new keywords with a tiny plugin system (see lib/plugins)

var bees = require('bees');
bees.use('plugin', function(cmd, json) {
  json.plugin = cmd[1];

Now you can use it

 * GET /:id
 * @param id id of the user
 * @return user infos
 * @plugin hai lol
$ node plugin.js
    method: 'GET',
    path: '/:id',
    params: { id: 'id of the user' },
    return: 'user infos',
    plugin: 'hai lol'

Reporters are a way to return formatted objects.

If we got this in eyes-reporter.js:

var inspector = require('eyes').inspector({stream: null});
module.exports = function(doc) {
  return inspector(doc);

And we call bees just like this:

bees -R eyes-reporter <file>

We will get:

Cool eh?

  • Generate HTML from JSON
$ npm test

Tests are written with Vows