Closed Stefanbracke closed 7 years ago
I have a folder root/app and root/dist. Vinyl-ftp (used in the root/gulpfile.js) should only upload new stuff in root/dist but not transfer the folder as "dist" to the ftp-server. Find below a simplified version of what I have.
var glob = [**]; return gulp.src( glob, { cwd: "dist", base: ".", buffer: false } ) .pipe( conn.newer('site/awebsitefolder')) // only upload newer files .pipe( conn.dest('site/awebsitefolder'));
But this does not work: A "dist" folder appears in the remote folder, albeit with the correct content. What am i doing wrong?
Try gulp.src( glob, { base: './dist', cwd: './dist', buffer: false } )
gulp.src( glob, { base: './dist', cwd: './dist', buffer: false } )
Thank you, that works for me
I have a folder root/app and root/dist. Vinyl-ftp (used in the root/gulpfile.js) should only upload new stuff in root/dist but not transfer the folder as "dist" to the ftp-server. Find below a simplified version of what I have.
var glob = [**]; return gulp.src( glob, { cwd: "dist", base: ".", buffer: false } ) .pipe( conn.newer('site/awebsitefolder')) // only upload newer files .pipe( conn.dest('site/awebsitefolder'));
But this does not work: A "dist" folder appears in the remote folder, albeit with the correct content. What am i doing wrong?