title: UglifyJS - convert all .js in a folder
body: <p>I was wondering if anyone could help, I'm attempting to finish off my build process which currently transpiles es6 > es5 using babel, After that has completed I want to use uglifyJS to recursively minify all my .js files using just NPM scripts (no grunt or gulp please).</p>
  
  <p>What I desire;</p>
  
  <ul>
  <li>Convert all .js in folder to es5</li>
  <li>Minify all .js files in a given folder using uglify</li>
  <li>Create source maps  </li>
  <li>Copy out to a new folder</li>
  </ul>
  
  <p>My current setup;</p>
  
  <ul>
  <li>Converts all .js to es5</li>
  <li>Minify all es5 .js files (However no sourcemaps are created, also the es5 js files are replaced as theres no support to move to another folder)</li>
  </ul>
  
  <p>I've tried: <a href="https://www.npmjs.com/package/recursive-uglifyjs" rel="noreferrer">https://www.npmjs.com/package/recursive-uglifyjs</a> and <a href="https://www.npmjs.com/package/uglifyjs-folder" rel="noreferrer">https://www.npmjs.com/package/uglifyjs-folder</a> but these both seem unable to perform the build steps I need</p>
  
  <p>Here is my package.json scripts section</p>
  
  <pre><code>   "babel": "babel js_uncompiled --out-dir js_uncompiled/es5 --source-maps  &amp;&amp; npm run npm:uglify",
      "build": "npm run babel",
      "uglify": "recursive-uglifyjs js_uncompiled/es5"
  </code></pre>
  
  <p>You can find a link to my full package.json here : <a href="http://pastebin.com/4UHZ1SGM" rel="noreferrer">http://pastebin.com/4UHZ1SGM</a></p>
  
  <p>Thanks</p>