code: function generate(target, generator) {
    return function(cb) {
      logger.debug('generate', target);
      generator(context, handleErrorCallback(function(err, data) {
        if (err) {
          logger.error('cannot generate ' + target);
          logger.debug(err);
          return;
        }
        write(target, data, cb);
      }));
    };
  }
docs: Return a function that will asynchronously generate the documentation
  and write the result.
  @param  {object} target      the target
  @param  {function} generator the generator function to use
  @return {function}           the function that will build this part of the documentation