title: How to save compiled underscore templates
body: <p>As you probably know, underscore templates need to be compiled before usage. 
  Now, if you have an application that uses lots of them, in order to render a specific UI composed of multiple so called partials, you need to compile all of them and this might take a lot of time. (Ref: <a href="http://underscorejs.org/" rel="nofollow">http://underscorejs.org/</a>)</p>
  
  <p>Now, dust framework on the other hand has an optimization there, it supports pre-compiled templates.
  (Ref: <a href="http://akdubya.github.com/dustjs/" rel="nofollow">http://akdubya.github.com/dustjs/</a>)</p>
  
  <p>If you want to achieve the same thing with underscore, you have to find your own tools.</p>
  
  <p>So far, I managed to fiddle the following code (tested in Chrome).
  <a href="http://jsfiddle.net/GNK6M/" rel="nofollow">http://jsfiddle.net/GNK6M/</a></p>
  
  <pre><code>sources = $('script').map(function(i, s){
      return _.template($(s).html()).prototype.constructor.source
  })
  console.log(sources.get().join("\n"))
  </code></pre>
  
  <p>This code generates the compiled temples' source code and prints it to the js console.</p>
  
  <p>Do you guys know better alternatives? The constraint is the templates have to be in underscore.</p>