title: Angular CLI Build Options
body: <p>I love Angular CLI and use it for all my Angular projects. But every now and again I run into a use case that the tremendously bad official docs don't help with. So at the risk of bundling too much into one question, here are my most pressing questions:</p>
  
  <ol>
  <li>How does one configure build targets and what are they used for? The official docs tell you how to specify them and distinguish between build <em>targets</em> and build <em>environments</em>, but leave the rest up to your imagination. I think it determines a few flag values and unflaggables (new word) like using <code>UglifyJS</code>.</li>
  <li><code>ng build --app</code> "Specifies app name or index to use." That little sentence there is the sum total of all documentation. I have a case where it would be handy to have one <code>index.html</code> for one environment and another <code>index.html</code> for another. I thought this may be it, but it seems not. Does anyone know how to use this, or to conditionally supply a different <code>index.html</code>?</li>
  <li>I have configured two additional environments and can read those values at run-time. Fabulous. What I want to do is include an additional script to deploy for my extra environments. So the normal <code>dev</code> and <code>prod</code> act as always, but <code>devextra</code> and <code>prodextra</code> deploys an extra file (a bit like conditionally adding something to <code>scripts</code> in <code>.angular-cli.json</code>.</li>
  </ol>
  
  <p>Points 2 &amp; 3 are for integration with another tool. My present workaround is a manual edit of index.html.</p>