I have a project folder where on local the script I use is in /deploy/ftp_upload.gulp.js and the remote files are in /.
So to upload the newest files is not the problem. But I also want to delete the files on the remote, which are already deleted locally. So the clean function seems perfect. But I already saw in googling and other issues that there are some issues here.
So I tried a few things, e.g.:
where dataFolder is the local root folder of the files. But than it throws an error with: throw new Error('base must be a non-empty string, or null/undefined.'); --> as I understand from the docs options and thus base is optional, so sorry to say that but very bad docs.
I also tried different options for base here, e.g.: /, ., ../, /**/* etc. But nothing helped. Sometimes it crashed with an error and sometimes my remote folder was empty afterwards.
So can somebody pls share the simplest minimal example, where the remote folder gets completely synced with the local folder (delete old files, update/upload/change new files). That would be great and I think that this will help a lot of people!
I have a project folder where on local the script I use is in
/deploy/ftp_upload.gulp.js
and the remote files are in/
. So to upload the newest files is not the problem. But I also want to delete the files on the remote, which are already deleted locally. So theclean
function seems perfect. But I already saw in googling and other issues that there are some issues here. So I tried a few things, e.g.:where dataFolder is the local root folder of the files. But than it throws an error with:
throw new Error('base must be a non-empty string, or null/undefined.');
--> as I understand from the docs options and thus base is optional, so sorry to say that but very bad docs. I also tried different options for base here, e.g.:/
,.
,../
,/**/*
etc. But nothing helped. Sometimes it crashed with an error and sometimes my remote folder was empty afterwards.So can somebody pls share the simplest minimal example, where the remote folder gets completely synced with the local folder (delete old files, update/upload/change new files). That would be great and I think that this will help a lot of people!
Thank you!