0.1.1 • Published 6 years ago

@quincyx/deploy-toolkit v0.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
6 years ago

quincy's sftp deploy tool

Usage

  • 引入依赖
npm i @quincyx/deploy-toolkit -D
  • 创建脚本

在项目根目录下创建文件 deploy.js

const path = require('path')
const deployTool = require('@quincyx/deploy-toolkit')

const option = {
  server: {
    host: '0.0.0.0',
    port: '22',
    username: '',
    password: '',
    privateKey:'',
    remotePath: '/www/web',
    localPath: path.resolve(__dirname, './dist'),
  },
  project: {
    name: config.name,
    version: config.version,
    url: 'https://www.null.com'
  },
  git: {
    enable: true,
    version: 'patch'
  },
  webhook: {
    enable: true,
    type: 'work_wx',
    key: 'work_wx_bot_key'
  }
}

deployTool.start(option)
  • 添加到 npm script

在 package.json 中添加部署脚本

"scripts": {
  "build:test": "vue-cli-service build --mode test",
  "deploy:test": "vue-cli-service build --mode test && node deploy.js"
}
0.1.1

6 years ago

0.1.0

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago