title: combine html template files into one JS file
body: <ol>
  <li>I have HTML template files (underscore template syntax)</li>
  <li>These files are saved in HTML format so they would be easy to edit (IDE syntax highlight)</li>
  <li>I don't want to fetch them with ajax, but rather combine them all and include them as a<code>js</code> file.</li>
  <li>Using GULP as my task-runner, I would like it to somehow <a href="https://www.npmjs.org/package/gulp-html2txt" rel="nofollow noreferrer">combine all</a> the HTML to something like this, as a javascript file that I could include in my BUILD process:</li>
  </ol>
  <p><em><code>template_file_name</code> is the HTML file name.</em></p>
  <pre><code>var templates = {
     template_file_name : '...template HTML string...',
     template_file_name2 : '...template HTML string...',
     template_file_name3 : '...template HTML string...'
  }
  </code></pre>
  <p>I don't really know how to approach this, and how to create such text from all the files..yes I can convert each individual file to a string, but how can I put it inside an object?</p>
  <hr />
  <h1>Update - Oct 25, 15 - ES6 modules:</h1>
  <p>For those who want your templates as ES6 modules, I have created <a href="https://www.npmjs.com/package/gulp-file-contents-to-modules" rel="nofollow noreferrer">gulp-file-contents-to-modules</a></p>
  <h3>Demo output:</h3>
  <pre><code>export var file_name = &quot;This is bar.&quot;;
  export var file_name2 = &quot;This is foo.\r\n&quot;;
  export var my-folder__file_name = &quot;This is baz.\r\n&quot;;
  </code></pre>
  <hr />
  <h2>All my NPM packages related to combining template files using gulp:</h2>
  <ol>
  <li><a href="https://www.npmjs.com/package/gulp-file-contents-to-keys" rel="nofollow noreferrer">https://www.npmjs.com/package/gulp-file-contents-to-keys</a></li>
  <li><a href="https://www.npmjs.com/package/gulp-file-contents-to-modules" rel="nofollow noreferrer">https://www.npmjs.com/package/gulp-file-contents-to-modules</a></li>
  <li><a href="https://www.npmjs.com/package/gulp-template-compile-es6" rel="nofollow noreferrer">https://www.npmjs.com/package/gulp-template-compile-es6</a></li>
  </ol>