Open matthewwithanm opened 9 years ago
@matthewwithanm: Thanks for referring me to the base
option in gulp.src
. I was not aware of it! I'll look into using it and properly deprecating the root
option if it can be used.
Woot! :confetti_ball:
Hey everyone, I would also like to thank you for the lib.
I am having a similar issue I think. I am trying to rsync the contents of a folder to a remote folder of a different name
gulp.src('dist/**').pipe rsync
username: 'me'
hostname: 'example.com'
destination: 'www/public/'
and the result is
~/www/public/dist/index.html
how can I make it produce the following
~/www/public/index.html
Thanks
@brenwell try to use root: 'dist'
option
Thanks for the plugin! It works great, but I have a small question about a part of the API that doesn't seem to gel with how gulp wants you to do things.
Initially I tried the following:
My expectation was that, given a file
./path/to/assets/image.jpg
, the file created on the remote would be/the/place/to/be/image.jpg
. This would be consistent withgulp.dest
and how thebase
option works:Instead, I was surprised to find that the result file was
/the/place/to/be/path/to/assets/image.jpg
—as though I had setbase
to.
in mygulp.src
call. After some digging, I saw that gulp-rsync has aroot
option to accomplish what I wanted.So it seems to me that gulp-rsync is essentially ignoring the base which, if it behaved as gulp expected, would make the
root
option redundant. It would be cool if the behavior were updated to behave more likegulp.dest
and similar plugins.Apologies in advance if I'm missing something!