title: Using pre-compiled templates with Handlebars.js (jQuery Mobile environment)
body: <p>I am struggling somewhat with pre-compilation of templates in Handlebars. My jQuery Mobile project is getting pretty big template-wise and I wish to pre-compile the templates I use.</p>
  
  <p>However I can't seem to find a good explanation (like a step by step tutorial) of how to do this with Handlebars.</p>
  
  <p>I still have my templates all inline using the script tags. I have handlebars installed using NPM. But now I am kinda lost in how to proceed. </p>
  
  <p>I am guessing doing something like</p>
  
  <pre><code>handlebars -s event.handlebars &gt; event.compiled
  </code></pre>
  
  <p>and somehow including the event.compiled contents? But then, how to call it.</p>
  
  <p>I am calling my templates like so</p>
  
  <pre><code>var source = $('#tmpl_profile').html(),
  template = Handlebars.compile(source),
  context = user.profile()),
  html    = template(context);
  </code></pre>
  
  <p>Hope someone can shed some light on this for me.</p>