1.0.2 • Published 8 months ago

@likesandy/nx-remotecache-ali-oss v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

NX Remote Cache Ali OSS

基于阿里云 OSS 的 NX 远程缓存实现,帮助加速团队的构建过程。

NPM版本 License

特性

  • 使用阿里云 OSS 作为 NX 远程缓存存储
  • 简单配置,易于集成
  • 提高团队构建速度

安装

# npm
npm install @likesandy/nx-remotecache-ali-oss --save-dev

# yarn
yarn add @likesandy/nx-remotecache-ali-oss -D

# pnpm
pnpm add @likesandy/nx-remotecache-ali-oss -D

配置

在您的nx.json文件中添加以下配置:

{
  "tasksRunnerOptions": {
    "default": {
      "runner": "nx-remotecache-custom",
      "options": {
        "cacheableOperations": ["build", "test", "lint", "e2e"],
        "customRunner": "@likesandy/nx-remotecache-ali-oss",
        "accessKeyId": "YOUR_ALI_ACCESS_KEY_ID",
        "accessKeySecret": "YOUR_ALI_ACCESS_KEY_SECRET",
        "bucket": "YOUR_OSS_BUCKET_NAME",
        "region": "YOUR_OSS_REGION",
        "folder": "nx-cache"
      }
    }
  }
}

您可以通过环境变量来设置敏感信息:

export ALI_OSS_ACCESS_KEY_ID=your_access_key_id
export ALI_OSS_ACCESS_KEY_SECRET=your_access_key_secret
export ALI_OSS_BUCKET=your_bucket_name
export ALI_OSS_REGION=oss-cn-hangzhou

配置选项

选项环境变量描述默认值
accessKeyIdALI_OSS_ACCESS_KEY_ID阿里云 OSS 访问密钥 ID-
accessKeySecretALI_OSS_ACCESS_KEY_SECRET阿里云 OSS 访问密钥 Secret-
bucketALI_OSS_BUCKETOSS 存储桶名称-
regionALI_OSS_REGIONOSS 区域oss-cn-hangzhou
folderALI_OSS_FOLDER存储桶中的文件夹路径nx-cache

许可证

MIT

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago