title: Creating single node module to access multiple extended classes in separate files authored in coffeescript
body: <p>I'd like to create a single node library that includes multiple classes, each authored using coffee-script in a different file and extending from one another. For instance, say I have the following files in node_modules/mymodule/src:</p>
  
  <p><strong>File 1:</strong></p>
  
  <pre><code>  class Base
      constructor: (@foo) -&gt;
  
    module.exports = Base
  </code></pre>
  
  <p><strong>File 2:</strong></p>
  
  <pre><code>  Base = require './Base.coffee'
  
    class Derived extends Base
      constructor: (@bar) -&gt;
        super
  
    module.exports = Derived
  </code></pre>
  
  <p><strong>File 3:</strong></p>
  
  <pre><code>  Base = require './Base.coffee'
  
    class Derived2 extends Base
      constructor: (@baz) -&gt;
        super
  
    module.exports = Derived2
  </code></pre>
  
  <p>Is there some way I can bind these 3 classes in such a way so that I can define "mymodule" in package.json file and then access the module and its classes like so?</p>
  
  <p><strong>File using mymodule:</strong></p>
  
  <pre><code>  my module = require 'mymodule'
  
    Base = new mymodule.Base
    Derived = new my module.Derived
    Derived2 = new my module.Derived2
    #Do stuff
  </code></pre>
  
  <p>I don't know what to do in package.json to make this happen, and I can't find documentation on this anywhere. Is this possible?</p>