Giter VIP home page Giter VIP logo

Comments (21)

rudchenkos avatar rudchenkos commented on July 25, 2024 4

I have implemented it in Pull Request #73

from gulp-sftp.

krysalead avatar krysalead commented on July 25, 2024 3

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.

kaosmos avatar kaosmos commented on July 25, 2024 1

@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.

krysalead avatar krysalead commented on July 25, 2024 1

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.

sebromero avatar sebromero commented on July 25, 2024

+1 or at least the possibility to overwrite folders would be awesome.

from gulp-sftp.

te-gpm avatar te-gpm commented on July 25, 2024

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.

sebromero avatar sebromero commented on July 25, 2024

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.

gtg092x avatar gtg092x commented on July 25, 2024

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.

te-gpm avatar te-gpm commented on July 25, 2024

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.

bartvanderwal avatar bartvanderwal commented on July 25, 2024

+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.

kaosmos avatar kaosmos commented on July 25, 2024

@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.

kaosmos avatar kaosmos commented on July 25, 2024

@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.

skrzyszewski avatar skrzyszewski commented on July 25, 2024

+1

from gulp-sftp.

wottpal avatar wottpal commented on July 25, 2024

+1

from gulp-sftp.

kaosmos avatar kaosmos commented on July 25, 2024

@gtg092x are you still on this project?

from gulp-sftp.

TCB13 avatar TCB13 commented on July 25, 2024

I was experiencing this issue and some others, moved to gulp-rsync and it works much better. Just my 2 cents.

from gulp-sftp.

TCB13 avatar TCB13 commented on July 25, 2024

@kaosmos I'm going plain old FTP when that happens. Seems to be the only viable option right now. Unfortunately. :(

from gulp-sftp.

kaosmos avatar kaosmos commented on July 25, 2024

yes and further it seems that @gtg092x has abandoned this package

from gulp-sftp.

ruslanxdev avatar ruslanxdev commented on July 25, 2024

+1

from gulp-sftp.

theenoahmason avatar theenoahmason commented on July 25, 2024

Without a clean method, this is not useable in the real world.

from gulp-sftp.

wottpal avatar wottpal commented on July 25, 2024

Sounds great @krysalead!

from gulp-sftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.