【发布时间】:2015-04-20 18:30:25
【问题描述】:
vinyl-ftp 有这个功能可以上传新的不同大小的文件 conn.differentSize(remoteFolder[, options] )
我正在尝试测试只有较新的文件会上传,但到目前为止没有任何事情发生,文件只是没有上传。这是我的配置。
gulp.task( 'deploy', function() {
var conn = ftp.create( {
host: hostremote,
user: userremote,
password: passremote,
parallel: 10,
log:true
} );
var globs = [
'*',
'build/**',
'dist/**',
'fonts/**',
'html/**',
'IE6/**',
'images/**',
'include/**',
'js/**',
'language/**',
'lib/**',
'!node_modules',
'!original',
'!node_modules/**',
'!original/**'
];
// using base = '.' will transfer everything to /public_html correctly
// turn off buffering in gulp.src for best performance
return gulp.src( globs, { base: '.', buffer: false } )
.pipe( conn.newerOrDifferentSize( '/test2' ) )
.pipe( conn.dest('/test') );} );
有什么想法吗?
【问题讨论】:
-
为什么您的远程文件夹在
conn.newerOrDifferentSize和conn.dest调用中不同? -
只是为了测试一下
标签: javascript node.js ftp gulp ftp-client