Looking for way to copy files in gulp and rename based on parent directory

前端 未结 5 1822
自闭症患者
自闭症患者 2020-12-02 06:51

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         


        
5条回答
  •  眼角桃花
    2020-12-02 07:19

    copy files in parallel

    gulp.task('copy', gulp.parallel(
    () =>  gulp.src('*.json').pipe(gulp.dest('build/')),
    () =>  gulp.src('*.ico').pipe(gulp.dest('build/')),
    () =>  gulp.src('img/**/*').pipe(gulp.dest('build/img/')),
    )
    );
    

提交回复
热议问题