auto-package-deployment
v1.0.5
Published
自动化打包部署
Downloads
2
Readme
- 安装
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" // 这个 },