title: Looking for way to copy files in gulp and rename based on parent directory
body: <p>For each module I have some files that need to be copied over to the build directory, and am looking for a way to minimize the repeated code from this: </p>
  
  <pre><code>gulp.src('./client/src/modules/signup/index.js')
    .pipe(gulp.dest('./build/public/js/signup'));
  
  gulp.src('./client/src/modules/admin/index.js')
    .pipe(gulp.dest('./build/public/js/admin'));
  </code></pre>
  
  <p>to something like this:</p>
  
  <pre><code>gulp.src('./client/src/modules/(.*)/index.js')
    .pipe(gulp.dest('./build/public/js/$1'));
  </code></pre>
  
  <p>Obviously the above doesn't work, so is there a way to do this, or an npm that already does this?</p>
  
  <p>Thanks</p>