title: Documenting Node.js projects
body: <p>I'm currently using <a href="http://code.google.com/p/jsdoc-toolkit/" rel="noreferrer">JSDoc Toolkit</a> to document my code, but it doesn't quite fit - namely, it seem to struggle with describing namespaces properly. Say you have two simple classes in each their files:</p>
  
  <p><code>lib/database/foo.js</code>:</p>
  
  <pre><code>/** @class */
  function Foo(...) {...}
  
  /** @function ... */
  Foo.prototype.init(..., cb) { return cb(null, ...); };
  
  module.exports = foo;
  </code></pre>
  
  <p>And then something inherited <code>lib/database/bar.js</code>:</p>
  
  <pre><code>var Foo = require('./foo');
  
  /**
   * @class
   * @augments Foo
   */
  function Bar(....) {...}
  
  util.inherits(Bar, Foo);
  
  Bar.prototype.moreInit(..., cb) { return cb(null, ...); };
  </code></pre>
  
  <p>In the generated documentation, this is output simply as <code>Foo</code> and <code>Bar</code>, without the leading <code>database</code> (or <code>lib.database</code>), which are quite necessary when you don't have everything in a global scope.</p>
  
  <p>I've tried throwing <code>@namespace database</code> and <code>@name database.Foo</code> at it, but it doesn't turn out nice.</p>
  
  <p>Any ideas for making JSDoc output something more suitable, or some entirely different tool that works better with Node.js? (I looked briefly at Natural Docs, JSDuck and breezed over quite a few others that looked quite obsolete...)</p>