@teambun/qcup

2.0.1 • Public • Published

qcup

code style: prettier

Efficient file uploader for QCloud.

Features

  • Concurrency Support
  • Report Sheet
  • Enable / Disable / Customize HTTP Cache

Installation

$ npm install -g @teambun/qcup

Config

$ qcup gen-config

After generating ~/.qcuprc.js, read instructions in the file, set it properly.

Usage

$ qcup --help

Cache Policy

Default cache policy for development without --cache option:

File Type / File Name Expire
All 60 seconds

Cache policy for production with --cache auto option:

File Type / File Name Expire
Type - HTML 60 seconds
Type - Others 1 year

Cache policy for files in certain pattern:

File Type / File Name Expire
Name - /\.stale\./ 60 seconds

Customize cache policy with --cache option, such as:

  • --cache 0: disable cache.
  • --cache 3600: set cache time to 1 hour.

Programmatic API

async function qcup(sourceDirectory, targetDirectory, concurrency, config, interactive, cache)

Argument Type Default Value
sourceDirectory String NA
targetDirectory String NA
concurrency Number 5
config Object{ AppId, SecretId, SecretKey, Bucket, Region } NA
interactive Boolean true
cache Number NA

LICENSE

MIT

Readme

Keywords

Package Sidebar

Install

npm i @teambun/qcup

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

20.1 kB

Total Files

14

Last publish

Collaborators

  • hellomg
  • rhyzx
  • relaxgo