Can you remove a folder structure when copying files in gulp?

前端 未结 2 1787
南旧
南旧 2020-11-29 02:25

If I use :

 gulp.src([\'app/client/**/*.html\'])
  .pipe(gulp.dest(\'dist\'));

The folder structure in which my .html files w

2条回答
  •  醉话见心
    2020-11-29 02:46

    You could use gulp-rename to accomplish this:

    var rename = require('gulp-rename');
    
    gulp.src('app/client/**/*.html')
      .pipe(rename({dirname: ''}))
      .pipe(gulp.dest('dist'));
    

提交回复
热议问题