morris / vinyl-ftp

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

There is no option to exclude folder from local path. #47

Closed impssngr closed 8 years ago

impssngr commented 8 years ago

Hi! I'd like to explaine, what I mean in title. Let's say, that I have this ierarchy:

/
  app
  dist
  gulpfile.js

So I want to all files from 'dist' (for 'distribution', with optimized files) folder be copied to my server path. Let it be 'www/domainname' When I tried to add ['./dist/**/*'] as my globs variable, it copies 'dist' folder itself.

The only way to solve this problem for now is to rename 'dist' folder to 'domainname' and they'll match. But this approach is bad for me (and I believe, for others too), because of the debugging all places, where 'dist' folder was mentioned. Thanks in advance!

morris commented 8 years ago

Please post this question to StackOverflow. Only create issues if you're sure that it's a bug or a missing feature in vinyl-ftp.

impssngr commented 8 years ago

I found a way, thank you!

nealoke commented 8 years ago

@andrewboot I am facing the same question, could you share your answer please?

nealoke commented 8 years ago

For people having the same issue the following will solve it :)

The base in gulp.src(globs, {base:''} is where the magic happens. If the content you want to upload is in a folder called "export", you can do the following: gulp.src(globs, {base:'./export/'}

This will upload all the files to your server withouth putting them in the "export" folder.