title: How to grunt-uglify multiple script files while keeping folder structure
body: <p>I have not found a good way to grunt-uglify multiple script files spread over multiple folders while keeping the folder structure including the uglified files intact.
  The only reason I want to do this is to be able to increase the performance of the "legacy" part of the web page I'm working on.</p>
  
  <p>I have found a way around this which I don't want to do, since it will take to much time, and that is to do it like in this answer (they specify each src and dest pair seperately):
  <a href="https://stackoverflow.com/questions/13358680/how-to-config-grunt-js-to-minify-files-separately">how to config grunt.js to minify files separately</a></p>
  
  <p>An example of what I want to achieve:</p>
  
  <pre><code>**src dir (no uglify applied):**
  src
   |- app1
      |- randomFile.js
      |- scripts
         |- file1.js
         |- file2.js
      |- libs
         |- file3.js
         |- file4.js
   |- app2
     |- scripts
         |- file1.js
         |- file2.js
  
  **destination dir (uglify applied, same file name):**
  dist
   |- app1
      |- randomFile.js
      |- scripts
         |- file1.js
         |- file2.js
      |- libs
         |- file3.js
         |- file4.js
   |- app2
      |- scripts
         |- file1.js
         |- file2.js
  </code></pre>
  
  <p>Btw, want to do the same for CSS-files if possible.</p>
  
  <p>Does anyone know if this is possible?</p>