前端命令自动化部署插件

196 阅读1分钟

scripts-deploy

npm version npm downloads JSDocs License

使用命令快速部署你的打包产物

Github 地址

📦 安装

pnpm i scripts-deploy -D

如果安装失败,你可以使用 pnpm i scripts-deploy -D --ignore-scripts
你也可以使用 npm yarn 安装

🦄 Usage

打开终端, 初始化 deploy.config 文件并编写它
deploy init

355720587-2c67bce4-89a2-4ac4-9e0f-919e3b9599cd.gif

查看示例
export default {
  host: '192.xxx',
  port: 10022,
  username: 'xxx',
  password: 'xxx',
  wwwPath: '/usr/xxx/xxx',
  rootDir: '/dist',
  confirm: true
}
查看参数类型
export interface ScriptsDeployOption {
  /** Server host */
  host: string
  /** Server post */
  port: number
  /** Server login username */
  username: string
  /** Server login password */
  password: string
  /** Server folder path */
  wwwPath: string
  /** Build output folder */
  rootDir: string
  /** Confirm execution */
  confirm?: boolean
}

See file

部署
deploy

355719585-226db360-02d0-4dc7-a323-bda3683bedf8.gif

License

MIT License © 2024-PRESENT warmthsea