I try to make a deploy-task in my gulpfile.
/** Configuration **/
var user = '12345';
var password = 'mypwd';
var host = 'example.com';
var port = 21;
var localFilesGlob = [
'build/*',
'php/*'];
var remoteFolder = '/gulptest'
function getFtpConnection() {
return ftp.create({
host: host,
port: port,
user: user,
password: password,
parallel: 5
});
}
gulp.task('deploy', function() {
var conn = getFtpConnection();
return gulp.src(localFilesGlob, { base: '.', buffer: false })
.pipe(conn.newer(remoteFolder))
.pipe(conn.dest(remoteFolder));
});
but gulp somehow doesn't upload the subfolders which are in php/
there is another issue, too .. sometimes gulp thows me an error
Error: Timeout while connecting to server at null._onTimeout (E:\XAMPP\htdocs\test\node_modules\vinyl-ftp\node_modules\ftp\lib\connection.js:304:24) at Timer.listOnTimeout (timers.js:92:15)
can someone tell me, what I am doing wrong?