2.0.1 • Published 6 years ago

@teambun/qcup v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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 NameExpire
All60 seconds

Cache policy for production with --cache auto option:

File Type / File NameExpire
Type - HTML60 seconds
Type - Others1 year

Cache policy for files in certain pattern:

File Type / File NameExpire
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)

ArgumentTypeDefault Value
sourceDirectoryStringNA
targetDirectoryStringNA
concurrencyNumber5
configObject{ AppId, SecretId, SecretKey, Bucket, Region }NA
interactiveBooleantrue
cacheNumberNA

LICENSE

MIT

2.0.1

6 years ago

2.0.0

6 years ago

1.5.1

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago