morris / vinyl-ftp

Blazing fast vinyl adapter for FTP
Other
388 stars 31 forks source link

Upload content of a subfolder only #76

Closed Stefanbracke closed 7 years ago

Stefanbracke commented 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?

Eroc33 commented 7 years ago

Try gulp.src( glob, { base: './dist', cwd: './dist', buffer: false } )

Stefanbracke commented 7 years ago

Thank you, that works for me