1.2.3 • Published 3 years ago

vite-plugin-lvdeploy v1.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

OSCS Status

使用

  1. 源码示例

  2. 仓库

  3. npm install vite-plugin-lvdeploy

  4. vite.config.js中引入import vitePluginLvdeploy from './vite-plugin-lvdeploy'

  1. 在plugins中添加并使用
plugins: [
  vue(),
  vitePluginLvdeploy({
    "dev":{
      host:'xxx.xxx.xxx.xxx',//服务器IP
      port:22,//服务器端口
      username:'xxxxxx',//服务器ssh登录用户名
      password:'xxxxxx',//服务器ssh登录密码
      serverpath:'/www/xxxx/xxxx',//服务器web目录 切记不要加/ 当前目录不存在会创建目录并且当前目录所有文件会被清空重新部署前端项目
    },
    "test":{
      host:'xxx.xxx.xxx.xxx',//服务器IP
      port:22,//服务器端口
      username:'xxxxxx',//服务器ssh登录用户名
      password:'xxxxxx',//服务器ssh登录密码
      serverpath:'/www/xxxx/xxxx',//服务器web目录 切记不要加/ 当前目录不存在会创建目录并且当前目录所有文件会被清空重新部署前端项目
    }
    //...其他自定义环境
  }),
]
  1. npm run build

注意

  • 当不输入0时只会打包zip包不会部署
  • serverpath参数路径 会自动检测是否存在不存在会创建目录 若存在会清空当前目录
  • vite.config.js中若未配置 build.outDir(打包文件名夹名称) 将会使用默认值 'dist';

预览效果

图片无法显示请去这里浏览

开始打包 开始打包截图

选择环境 选择环境截图

开始部署 开始部署截图

服务器查看 服务器查看截图

1.2.3

3 years ago

1.2.2

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago