Created
September 7, 2018 04:21
-
-
Save pschfr/eaa721434db0ac9c938d4c28e95123cd to your computer and use it in GitHub Desktop.
Simple Gulp file to deploy via FTP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
util = require('gulp-util'), | |
vftp = require('vinyl-ftp'); | |
gulp.task('default', function() { | |
var conn = vftp.create({ | |
host: 'domain.com', | |
user: 'username', | |
pass: 'password', | |
parallel: 8, | |
log: util.log | |
}), | |
globs = 'www/**'; | |
return gulp.src(globs, { buffer: false }) | |
.pipe(conn.newer('/public_html/subfolder')) | |
.pipe(conn.dest('/public_html/subfolder')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to run
npm install gulp gulp-util vinyl-ftp
before using this.