title: Compile CoffeeScript in the browser with extras/coffee-script.js
body: <p>I would like to create a simple demo page that compiles CoffeeScript in the browser with the <a href="http://jashkenas.github.io/coffee-script/extras/coffee-script.js" rel="nofollow">extras/coffee-script.js</a>. However, when I add this source and write my CoffeeScript within my text/coffeescript tags it is compiled in a closure so I don't have access to the CoffeeScript functions in the browser console.</p>
  
  <p>In order to do so, I would need to do</p>
  
  <pre><code>&lt;script type="text/coffeescript"&gt;
    window.learning = -&gt;
      "I am learning coffeescript"
  &lt;/script&gt;
  &lt;script type="text/javascript" src="js/vendors/coffee-script.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This is not ideal for my presentation. I would like to add the bare = true option so that I have access to the functions in browser console. Where in the <a href="http://jashkenas.github.io/coffee-script/extras/coffee-script.js" rel="nofollow">extras/coffee-script.js</a> do I add this option?</p>
  
  <p>Here is the compiled js:</p>
  
  <pre><code>(function() {
    window.learning = function() {
      return "I am learning coffeescript";
    };
  })
  </code></pre>
  
  <p>I have this example.coffee:</p>
  
  <pre><code>learning = -&gt;
    "I am learning coffeescript"
  </code></pre>
  
  <p>Running the compiler from the command line with the following:</p>
  
  <pre><code>coffee -c --bare example.coffee
  </code></pre>
  
  <p>It is compiled to this example.js:</p>
  
  <pre><code>// Generated by CoffeeScript 1.6.2
  var learning;                                                                   
  
  learning = function() {
    return "I am learning coffeescript";
  };
  </code></pre>
  
  <p>This will be globally available from the console.</p>