Nit-Picking Magistrate

    @urcloud/oss-deploy
    TypeScript icon, indicating that this package has built-in type declarations

    1.7.5 • Public • Published

    oss-deploy

    NPM version

    Cli tool for deploy assets to tencent cos.

    How it works

    1. Read name,version fields from root package.json.
    2. Read config from oss-deploy.yaml.(use --config to custom config)
    3. Check prefix/name/mode@version whether exists on tencent cos.(use --force to ignore repeated version)
    4. Upload local assets from dist.
    5. Clear unused asests on tencent cos(keep only recent 5 versions of each mode).

    Install

    npm i @urcloud/oss-deploy -D

    Usage

    1. create oss-deploy.yaml
    dist: ./dist
    # distFilter:
    #   directoryFilter:
    #     - '!.git' 
    #     - '!*modules'
    target:
      # prefix: oss-deploy
      # name: test
      mode: prod
      # version: 1.0.0
    oss:
      region: ${env.COS_REGION}
      bucket: ${env.COS_BUCKET}
      secretId: ${env.COS_SECRET_ID}
      secretKey: ${env.COS_SECRET_KEY}
    1. add scripts in package.json
    {
      "scripts": {
        "deploy-oss:test": "oss-deploy upload -c ./oss-deploy-test.yaml -f",
        "deploy-oss:prod": "COS_REGION=aa COS_BUCKET=bb COS_SECRET_ID=cc COS_SECRET_KEY=dd oss-deploy upload"
      }
    }

    Changelog

    v1.7.5

    • Using yaml as config file.
    • Fix clear assets bug.
    • Console VERSIONS_BEFORE and VERSIONS_AFTER.

    v1.6.1

    • Support ossDeploy field in package.json.

    v1.5.6

    • Add rootPrefix in config.
    • Export generatePrefix function.
    • mode add test type.

    v1.4.1

    • Support concurrent upload 3 files.

    v1.3.7

    • Fix ossConfig bug.

    Install

    npm i @urcloud/oss-deploy

    DownloadsWeekly Downloads

    22

    Version

    1.7.5

    License

    MIT

    Unpacked Size

    44.7 kB

    Total Files

    20

    Last publish

    Collaborators

    • zenonux