title: Generate HTML files in sbt
body: <p>I have a Scala.js project with an <code>index.html</code> file. Currently I use a structure like in <a href="https://github.com/sjrd/scala-js-example-app" rel="nofollow">Scala.js example</a>, with two different <code>index.html</code> files for <code>fullOptJS</code> and <code>fastOptJS</code> builds. However I would like to DRY this somehow.</p>
  
  <p>I think it should be possible to generate both <code>index.html</code> and <code>index-fastopt.html</code> from a common source template using a simple Scala code doing the substitution of the variable parts. Perhaps one could achieve this using <a href="http://www.scala-sbt.org/0.12.4/docs/Howto/generatefiles.html" rel="nofollow">Generating sources and resources</a>, but I am unsure how.</p>