@forchange/deploy
[![npm version](https://img.shields.io/npm/v/@forchange/deploy.svg)](https://www.npmjs.com/package/@forchange/deploy) [![license](https://img.shields.io/npm/l/@forchange/deploy.svg)](https://www.npmjs.com/package/@forchange/deploy)
Last updated 5 months ago by simdd .
ISC · Original npm · Tarball · package.json
$ cnpm install @forchange/deploy 
SYNC missed versions from official npm registry.

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"]
};

Current Tags

  • 0.2.7                                ...           latest (5 months ago)

9 Versions

  • 0.2.7                                ...           5 months ago
  • 0.2.6                                ...           10 months ago
  • 0.2.5                                ...           10 months ago
  • 0.2.4                                ...           10 months ago
  • 0.2.3                                ...           10 months ago
  • 0.2.2                                ...           10 months ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (2)
Downloads
Today 1
This Week 54
This Month 54
Last Day 7
Last Week 43
Last Month 342
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |