Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deployvue

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deployvue

deploy vue project

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

deployvue npm

deploy vue project —— 自动化部署

deployvue 部署流程

1、执行 build 命令
2、自动压缩打包后的文件夹
3、连接服务器,创建部署目录及备份目录(用于回退版本)
4、scp 将打包后的压缩包上传到服务器指定路径
5、利用已有的服务器连接,在服务器端解压压缩包
6、删除本地的打包文件及压缩包,部署完成
7、支持回退版本

安装

$ npm i deployvue -g

使用

1、参考 添加本机的 SSH 公钥到服务器 进行本机与服务器连接的准备工作;

2、执行 deployvue init,在生成的 deploy.config.js 中进行自定义设置;

3、在 package.json 中新增 deploy 相关命令,即可使用 npm run deploynpm run deploy:staging 进行正式环境或测试环境部署

// package.json

"scripts": {
  "build": "vue-cli-service build",
  "build:staging": "vue-cli-service build --mode staging",
  "deploy": "deployvue build && deployvue deploy && deployvue clean",
  "deploy:staging": "deployvue build -e staging && deployvue deploy -e staging && deployvue clean"
}
# 查看版本
$ deployvue -V / --version

# 初始化项目的部署配置文件
$ deployvue init

# 打包项目代码
$ deployvue build -e staging / deployvue build

# 部署到指定环境的服务器
$ deployvue deploy -e staging / deployvue deploy

# 回退到上一次部署的版本
$ deployvue rollback -e staging / deployvue rollback

# 清理本地打包临时文件
$ deployvue clean

deployvue build 等同于 deployvue build -e production

Keywords

FAQs

Package last updated on 20 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc