Skip to content

hank-cp/vue-cli-plugin-ssh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-cli-plugin-ssh

vue-cli3 ssh插件

安装

命令

vue add ssh

使用准备

向你的 vue.config.js 文件的 pluginOptions对象上添加一些配置

module.exports = {
    pluginOptions: {
        ssh:{
            projectName: 'projectName', // Optional. If provided, target will be uploaded to 'remotePath/projectName', otherwise to 'remotePath/'
            host: 'localhost',
            port: 22,
            username: 'root',
            password: '123456',
            // privateKey: require('fs').readFileSync('/here/is/my/key')
            remotePath:'/var/www',
            localPath:'dist'
        }
    }
}

命令行模式下的一些配置


请保证 package.json 文件的scripts 下有 ssh命令

"scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "ssh": "vue-cli-service build && vue-cli-service ssh"
},

现在使用命令行运行

npm run ssh

或者

yarn ssh

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%