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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…