javascript - Gulp move files without the directory structure -
this question has answer here:
how move files using gulp different folders in src directory dist folder without keeping directory structure src.
for eg:
var sourcefiles = [ "src/folder1/test.js", "src/folder1/test1.js" ];
should moved dist folder i.e:
dist/test.js dist/test1.js
using this:
gulp.task("movefiles",function(){ return gulp.src(sourcefiles, {base: "src"}) .pipe(gulp.dest("dist")); });
moves dist/folder1 ie
dist/folder1/test.js dist/folder1/test1.js
i ended solving issue without using base option:
gulp.task("movefiles",function(){ return gulp.src(sourcefiles) .pipe(gulp.dest("dist")); });
Comments
Post a Comment