title: Best template engine for generate javascript from Node.js
body: <p>For me, to produce HTML or XML, pug is favorite one.</p>
  
  <p>However, when the expected result is not based on mark up language, I used to use Handlebars. But When I produce javascript dynamically using handlebar, It makes very difficulties to maintain templates and terrible readability to keep generated code pretty.</p>
  
  <p>When I do same thing with java, I prefer to use Xtend. </p>
  
  <p>Is there any template engine that is intended to generate code?
  (which is not based on AST)</p>
  
  <hr>
  
  <h3>Full Scenario</h3>
  
  <ol>
  <li>I made a Java Script library using TypeScript.</li>
  <li>To make Eclipse's Java Script type inference engine can support content assist for this library, I needed to create some TS to JS-skeleton trans-compiler. (result js just contains scheme and js-doc for Eclipse JS capability) </li>
  <li>I used type-script from NPM to inspect library scheme.</li>
  <li>I transformed TypeScript AST to my own purpose model to generate JavaScript files.</li>
  <li>Then I need to generate Java Script files from this model, And I'm looking for best template engine.</li>
  <li>The template engine should be easy to manage indent, iteration, conditional templates to generate clear code with readable template.</li>
  </ol>