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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -