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:
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'));
to something like this:
gulp.src('./client/src/modules/(.*)/index.js')
.pipe(gulp.dest('./build/public/js/$1'));
Obviously the above doesn't work, so is there a way to do this, or an npm that already does this?
Thanks