title: How can I rename files with Grunt, based on the respective file's parent folder name?
body: <p>I have a the following structure:</p>
  
  <pre><code>src/
      modules/
          module1/
              js/
                  main.js
              scss/
                  main.scss
              index.html
          module2/
              js/
                  main.js
              scss/
                  main.scss
              index.html
  </code></pre>
  
  <p>I'd like to run a grunt task to copy these out to the following structure:</p>
  
  <pre><code>dev/
      js/
          module1.js
          module2.js
      css/
          module1.css
          module2.css
      module1.html
      module2.html
  </code></pre>
  
  <p>Is there a way to do this with an existing grunt plugin? If not, how could I achieve this?</p>