0.2.7 • Published 4 years ago

@forchange/deploy v0.2.7

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

deploy

npm version license

上传文件到 oss(目前只支持 aliyun)

Installing

$ npm install @forchange/deploy

Usage

command

通过 upload 命令上传,命令会自动检测当前执行路径下的 deploy.config.js 文件。

$ upload

require

通过导入模块函数调用。

const { uploadStatic } = require("@forchange/deploy");

uploadStatic({
  ...config
});

Config

config 为上传操作相关的配置文件

格式如下:

  • cdn{Object} ali-oss 配置
    • region{String}
    • accessKeyId{String}
    • accessKeySecret{String}
    • bucket{String}
  • staticRootPath{String} 静态资源根路径
  • include{Array}
  • retryMaximum{Number} 重试次数
  • chunkLimit{Number} 最大上传并行数

example:

// deploy.config.js

module.exports = {
  cdn: {
    region: "",
    accessKeyId: "",
    accessKeySecret: "",
    bucket: ""
  },
  staticRootPath: "path/to/static",
  retryMaximum: 3,
  chunkLimit: 5,
  include: ["/**/*.js"]
};
0.2.7

4 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago