Skip to content

pendalf/gulp-git-ftp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ use at your own risk

gulp-git-ftp

This plugin is the fork of this plugin https://github.com/joseadrian/gulp-git-ftp
New feature:
- Added the ability to work with a remote directory on ftp

Gulp plugin to upload files based on the hash of the last commit found on the ftp-server inside a .gulpfile. If the file is not found or is empty, the files from ls-files are uploaded. Based on gulp-gitmodified

Before installing

The uploads are going to be uploaded to the root. It depends on the ftp user you are using.

Install

$ npm install --save-dev git:https://github.com/pendalf/gulp-git-ftp.git#dev

Usage

var gulp = require('gulp');
var gitftp = require('gulp-git-ftp');

gulp.task('upload', function () {
  /*                       avoid node_modules files = faster */ 
  var opts = {
  	'remoteDir': 'test-gulp-ftp/'
  }
  return gulp.src(['./**', '!./**/node_modules/**'], opts)
             .pipe(gitftp(opts));
});

API

gitftp()

Instead of adding the options to connect to the FTP server inside de gulpfile.s, which in some cases would be commited, the options are gotten from the git config file.

git config gulp-gitftp.host localhost
git config gulp-gitftp.port 21
git config gulp-gitftp.user username
git config gulp-gitftp.password pass

.ftpignore file

If you want to ignore files, create a file .ftpignore the same way you create .gitignore files.

TO DO

  • Option to set the path

License

MIT © Joseadrian

About

Gulp plugin to upload files based on last hash

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%