teambition / gulp-ssh

SSH and SFTP tasks for gulp
184 stars 38 forks source link

gulpssh.dest: delete remote instead of skipping? #61

Open tcfunk opened 7 years ago

tcfunk commented 7 years ago

What is your opinion on implementing remote file deletion instead of skipping empty/deleted files? I am currently trying using gulpssh.dest to synchronize my local directory with my server directory, which seems to work for everything but file deletion.

zensh commented 7 years ago

try gulpSSH.shell('mv dest dest_bk') and then gulpssh.dest

tcfunk commented 7 years ago

I need it to work with gulp-watch, though. So if the file watcher detects that a file is deleted, it is deleted on the destination server as well. Currently, this scenario causes lines 239-241 to trigger. My thoughts would be to run sftp.unlink here rather than skipping.

zensh commented 7 years ago

@nekolab Do you have interesting on this issue?