[go: up one dir, main page]

@zackarydev/nx-remotecache-gcs
TypeScript icon, indicating that this package has built-in type declarations

18.0.1 • Public • Published

Nx RemoteCache for Google Cloud Storage

This is a public package published to the NPM registry.

A task runner for Nx that uses a Google Cloud Storage bucket as a remote cache, so all team members and CI servers can share a single cache. The concept and benefits of computation caching are explained in the NX documentation.

Setup

yarn install --save-dev @zackarydev/nx-remotecache-gcs

Create a Google Cloud Storage bucket. Since this is only a cache, there is no need for a dual- or multi-region bucket, so choose a single location near you.

You may also setup a lifecycle rule for the bucket to automatically delete old files. A suggested 30 day period seems to work well.

Your Google Cloud user must be connected using the gcloud CLI. Make sure the user has access to the bucket.

Nx Setup

Add this runner as the default task runner, ex:

finally, add tasksRunnerOptions in your nx.json file

{
  "tasksRunnerOptions": {
    "default": {
      "runner": "@zackarydev/nx-remotecache-gcs",
      "options": {
        "bucketName": "gs://NAME_OF_YOUR_BUCKET"
      }
    }
  },
}
  • Note that these options may change with new releases of Nx.

Build

  1. Make changes to files within this project's directory.
  2. cd to this project's directory (tools/nx-remotecache-gcs)
  3. Run yarn build
  4. Run yarn release when ready (or cd dist followed by npm publish)

Package Sidebar

Install

npm i @zackarydev/nx-remotecache-gcs

Weekly Downloads

9

Version

18.0.1

License

MIT

Unpacked Size

4.37 kB

Total Files

4

Last publish

Collaborators

  • zackarydev