auto-package-deployment

1.0.5 • Public • Published
  • 安装

cnpm install auto-package-deployment -D

  • 使用
    • 创建一个 a.js 文件

      const autoPackageDeployment = require('auto-package-deployment')
      
      const SERVER_PATH = '127.0.0.0' 
      const SSH_USER = 'root' 
      const PASSWORD = '*********'
      const CONFIG = Object.freeze({
        development: { // 开发环境配置
          SERVER_PATH,
          SSH_USER,
          PASSWORD,
          PATH: '/home/***' 
        },
        test: {  // 测试环境配置
          SERVER_PATH,
          SSH_USER,
          PASSWORD,
          PATH: '/home/***' 
        },
        production: {  // 生产环境配置
          SERVER_PATH,
          SSH_USER,
          PASSWORD,
          PATH: '/home/***' 
        }
      })
      
      autoPackageDeployment.initUpload(CONFIG)
      // autoPackageDeployment.initUpload(CONFIG,'vite build')
      
      
    • 部署

        node a.js
    • 或者直接放在package.json中

        "scripts": {
            "serve": "vue-cli-service serve",
            "build": "vue-cli-service build",
            "deploy": "node a.js" // 这个
          },

Readme

Keywords

none

Package Sidebar

Install

npm i auto-package-deployment

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

22.4 kB

Total Files

5

Last publish

Collaborators

  • huangbohang