Ninja Pirate Marksman

    aliyunoss-cli

    1.1.1 • Public • Published

    aliyunoss-cli

    阿里云 OSS 文件上传 CLI。

    Install

    You can get aliyunoss-cli via npm.

    npm install aliyunoss-cli --save-dev
    

    Usage

    创建配置文件 alioss.config.json

    {
      "region": "-",
      "accessKeyId": "-",
      "accessKeySecret": "-",
      "bucket": "-",
      "releaseEnvConf": {
        "dev": {
          "source": "dist/",
          "target": "home/dev/"
        },
        "pre": {
          "source": "dist/",
          "target": "home/pre/"
        },
        "prd": {
          "source": "dist/",
          "target": "home/prd/"
        }
      }
    }
    

    运行:

    # 测试
    npx aliyunoss-cli --releaseEnv dev
    # 预发布
    npx aliyunoss-cli --releaseEnv pre
    # 生产
    npx aliyunoss-cli --releaseEnv prd
    

    更多命令 npx aliyunoss-cli --help

    Usage: aliyunoss-cli [options]
    --help               查看帮助
    --version            查看版本
    --config             配置文件路径 默认: ./alioss.config.json
    --releaseEnv         发布环境 例如: dev pre prd
    --source             本地静态文件路径 例如: dist/
    --target             阿里云 OSS 文件路径 例如: static/home/
    --accessKeyId        阿里云 OSS accessKeyId
    --accessKeySecret    阿里云 OSS accessKeySecret
    --bucket             阿里云 OSS bucket
    --region             阿里云 OSS region
    

    thx

    Jeremy Liang

    Keywords

    Install

    npm i aliyunoss-cli

    DownloadsWeekly Downloads

    4

    Version

    1.1.1

    License

    ISC

    Unpacked Size

    19.1 kB

    Total Files

    10

    Last publish

    Collaborators

    • mazeyqian