How do I move files using Gulp from different folders in my src directory into the dist folder without keeping the directory structure from src.
For eg:
var sourceFiles = [
"src/folder1/test.js",
"src/folder1/test1.js"
];
should be moved to the dist folder i.e:
dist/test.js
dist/test1.js
Using something like this:
gulp.task("moveFiles",function(){
return gulp.src(sourceFiles, {base: "src"})
.pipe(gulp.dest("dist"));
});
moves it to dist/folder1 ie
dist/folder1/test.js
dist/folder1/test1.js