title: Get started with Backbone and CoffeeScript
body: <p>I think this is more of a <a href="http://coffeescript.org/" rel="noreferrer">CoffeeScript</a> question.  I want to be able to use classes from <a href="http://documentcloud.github.com/backbone/" rel="noreferrer">Backbone</a> in a <code>foo.coffee</code> file.  I tried using the <code>-r</code> option to require <a href="http://documentcloud.github.com/backbone/" rel="noreferrer">Backbone</a> when running the <code>coffee</code> command:</p>
  
  <pre><code>coffee -r "../backbone" -c foo.coffee
  </code></pre>
  
  <p>The compiler complained that <a href="http://documentcloud.github.com/backbone/" rel="noreferrer">Backbone</a> was undefined.  I'm sure that this must be pretty simple.  It's easy to find examples of people using <a href="http://coffeescript.org/" rel="noreferrer">CoffeeScript</a> and <a href="http://documentcloud.github.com/backbone/" rel="noreferrer">Backbone</a> together. I also tried requiring the class at the top of the file like so:</p>
  
  <pre><code>Backbone.model = require('../../backbone').Model
  
  class foo extends Backbone.model
  </code></pre>
  
  <p>I could write it to <code>console.log</code> in the <code>initialize</code> method.  When I tried writing <code>this</code> to <code>console.log</code>, I just got an empty object <code>{}</code>.</p>
  
  <p>Can anyone tell me how to get this going?</p>