Answer the question
In order to leave comments, you need to log in
Is vinyl-ftp not working correctly?
There is such a config, everything works, but not all files are thrown off, always in a random amount. Maybe the hoster cuts off the session.
gulp.task( 'ftp', function() {
var ftpConf = JSON.parse(fs.readFileSync('./ftp.json'));
var conn = ftp.create( {
host: myhost',
user: ftpConf.user,
password: ftpConf.pass,
parallel: 21,
} );
var globs = [
'dist/css/',
'dist/fonts/',
'dist/img/',
'dist/js/',
'dist/*.html'
];
return gulp.src(globs, {buffer: false})
.pipe( conn.newer( 'httpdocs/myhost/'+ftpConf.name) )
.pipe( conn.dest( 'httpdocs/myhost/'+ftpConf.name) );
} );
Answer the question
In order to leave comments, you need to log in
It looks like the problem was in the number of parallel connections
var conn = ftp.create( {
host: 'myhost',
user: ftpConf.user,
password: ftpConf.pass,
parallel: 1,
maxConnections:1
} );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question