If I use :
gulp.src(['app/client/**/*.html']) .pipe(gulp.dest('dist')); The folder structure in which my .html files were in, is maintained in the dist folder, but I would like to remove the folder structure completely and just a flat hierarchy in my dist folder.
Type "xcopy", "source", "destination" /t /e in the Command Prompt window. Instead of “ source ,” type the path of the folder hierarchy you want to copy. Instead of “ destination ,” enter the path where you want to store the copied folder structure. Press “Enter” on your keyboard.
var copy = require('gulp-copy'); gulp. task('copy-resources', function() { return gulp. src('./src/img/*. png') .
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'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With