Comments (21)
I have implemented it in Pull Request #73
from gulp-sftp.
Hi All,
I published
gulp-sftp-clean on NPM which contains the code from @rudchenkos
I am using it and it does the job
Regards
from gulp-sftp.
@TCB13 yes, gulp-rsync
works very well but, alas, I don't have rsync
available in every environment I have the pleasure to work on :)
from gulp-sftp.
Thanks for having implemented this feature, I was looking to it. @gtg092x can you please review and merge.
Otherwise we can publish a fork with a different name
from gulp-sftp.
+1 or at least the possibility to overwrite folders would be awesome.
from gulp-sftp.
I ended up using gulp-rsync which supports a clean parameter that will delete files not included in the synced folder.
https://www.npmjs.com/package/gulp-rsync
I'm missing an option to store credentials in a separate file, but maybe this will be included in gulp-sftp in the future :)
from gulp-sftp.
Thx @te-gpm , rsync isn't an option for me because I use a shared hosting environment which doesn't offer rsync.
from gulp-sftp.
Hey all - I'm being a bad project maintainer here. I'm hesitant to dive into the feature because mistakes can end up deleting valuable assets (extra paranoid). Can I get anyone to help with its development? I'd be happy to make the change if someone can pull the branch and test it with me.
from gulp-sftp.
Hey gtg092x,
unfortunately I'm pretty swamped right now, so I won't be able to help with development, but I'd be happy to help testing on a VM if you were to develop this feature :)
Just drop me a line or post here if I can be of assistance.
from gulp-sftp.
+1!
I'd also be happy to help @gtg092x. Assuming I have the time when you drop me a line. And I', using it currently, do.. Otherwise @te-gpm might have some time then.
Great work with this repo!
from gulp-sftp.
@te-gpm actually you can put the credentials in a different file already.
Create a file called .sftppass.json
(or whatever you prefer) in the same dir where your gulpfile.js
resides and put your credentials inside it, like this:
{
"host": "yourhost",
"user": "youruser",
"pass": "yourpass"
}
then use it in your gulpfile.js
, like this:
var gulp = require('gulp');
var sftp = require('gulp-sftp');
var sftppass = require('./.sftppass.json');
gulp.task('default', function () {
return gulp.src('src/*')
.pipe(sftp(sftppass));
});
also you can ignore .sftppass.json
in your version system to commit your gulfile.js
without distributing your credentials around
from gulp-sftp.
@gtg092x I'm also interested in cleaning the remote dir (or move it to a backup location) and I can help you out in trying this, I'm extra paranoid too so don't worry: even if we end up deleting some precious asset I definitely have it backuped somewhere :)
Maybe a good approach to this kind of things is having the ability to forward some command directly without a prebuilt method, something like the .ssh()
, .sftp()
or .shell()
of this module: https://github.com/teambition/gulp-ssh so the advanced user can do almost everything and is responsible of his/her actions.
from gulp-sftp.
+1
from gulp-sftp.
+1
from gulp-sftp.
@gtg092x are you still on this project?
from gulp-sftp.
I was experiencing this issue and some others, moved to gulp-rsync
and it works much better. Just my 2 cents.
from gulp-sftp.
@kaosmos I'm going plain old FTP when that happens. Seems to be the only viable option right now. Unfortunately. :(
from gulp-sftp.
yes and further it seems that @gtg092x has abandoned this package
from gulp-sftp.
+1
from gulp-sftp.
Without a clean method, this is not useable in the real world.
from gulp-sftp.
Sounds great @krysalead!
from gulp-sftp.
Related Issues (20)
- ignore files and folders HOT 1
- Execute remote commands
- Remote file structure is incorrect HOT 2
- Known file size is required HOT 3
- "Quiet" mode?
- Timed out while waiting for handshake HOT 2
- trying to upload a build
- Fails on symbolic links pointing to a directory
- Is this project abandoned?? HOT 5
- issue with connection HOT 2
- Add support for gulp-cached
- Directory creation oddities
- update dependency version for ssh2
- Error: read ECONNRESET
- TypeError: file.pipe is not a function HOT 21
- could you add delete server path for this plugin HOT 1
- Can't find uploaded file on my target machine
- Don't work to upload through gulp-sftp HOT 10
- gulp-util dependency
- sft hangs on connect when using putty ppk file as private key HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-sftp.