ftpgulpvinyl

Gulp vinyl ftp - Remove local deleted files


I use vinyl ftp to deploy my project on remote server. No problem to upload files but i would also like to delete files that aren't anymore in local folder.

Example :

Local folder

./
fileA
fileB
fileC

Remote folder :

./
fileB
fileC
fileD

What i have in remote folder for the moment after deploy :

./
fileA
fileB
fileC
fileD

What i would like (exactly same as local folder) :

./
fileA
fileB
fileC

I could use rmdir to delete all files but that implies to reupload all files for each deploy.

Thank you


Solution

  • Doesn't look like its implemented yet:

    https://github.com/morris/vinyl-ftp/issues/33

    (2016-06-20) edit by @ajoah: It's implemented since version 0.5.0 through clean function.