【问题标题】:Gulp v4 SFTP file deploymentGulp v4 SFTP 文件部署
【发布时间】:2019-10-10 08:32:03
【问题描述】:

目前我正在使用“vinyl-ftp”进行部署。但这不适用于 SFTP 连接。 你们用什么来与 Gulp 4 进行 SFTP 连接?

【问题讨论】:

    标签: deployment gulp sftp gulp-4


    【解决方案1】:

    我用gulp-rsync,很可能,它也适合你

    【讨论】:

    • function deployTest(){ return gulp .src('/WIP/assets/test/**') .pipe(rsync({ root: 'sftp.abc.com', hostname: 'abc.com', destination: '/assets/test', username: 'xxx', password: 'xxx', archive: true, silent: false, compress: true, progress: true })); console.log("Deploy Started"); }; 我试过了。不工作。是否可以提供任何示例?谢谢。
    • gulp.task('rsync', function() { return gulp.src('app/**') .pipe(rsync({ root: 'app/', hostname: 'username@yousite.com', destination: 'yousite/public_html/', // include: ['*.htaccess'], // Includes files to deploy exclude: ['**/Thumbs.db', '**/*.DS_Store'], // Excludes files from deploy recursive: true, archive: true, silent: false, compress: true })) });
    • 不幸的是,这不起作用。你是怎么提到密码的?
    猜你喜欢
    • 2017-03-11
    • 2014-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-17
    • 2015-04-09
    • 1970-01-01
    相关资源
    最近更新 更多