0

我尝试在我的 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));
});

但 gulp 不知何故不会上传其中的子文件夹php/

还有另一个问题..有时 gulp 会给我一个错误

错误:在 Timer.listOnTimeout (timers.js: 92:15)

有人可以告诉我,我做错了什么吗?

4

0 回答 0