title: Handlebars precompiled to plain HTML
body: <p>Is there a way to precompile a Handlebars template to plain HTML? Handlebars precompile produces a js file. Can I run that JS on node to produce a HTML file? This is how I'm trying:</p>
  
  <pre><code>// Get a Handlebars instance
  var hb = require("handlebars");
  
  // Load a template
  import fs = require('fs');
  var template:string = fs.readFileSync('templates/template.handlebars','utf8');
  
  // Compile said template
  var compiled = hb.precompile(template);
  
  // Write JS file
  fs.writeFileSync('compiled/template.js', compiled);
  
  var test = compiled.main();
  
  // Write HTML file
  fs.writeFileSync('compiled/template.html', test);
  </code></pre>
  
  <p>This fails as compiled.main is not a function. There's a main function in there though, which I'm trying to get at. </p>