From 56803f6439fe3ff9909c93eb7f947d04c47829cd Mon Sep 17 00:00:00 2001 From: warflash Date: Wed, 17 Jan 2024 16:39:23 +0100 Subject: [PATCH] docs: minor general improvements on wording and gammar --- docs/custom-remote-caching.md | 16 ++++++++-------- docs/deployment-environments.md | 6 +++--- docs/running-in-lambda.md | 6 +++--- docs/supported-storage-providers.md | 16 ++++++++-------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/custom-remote-caching.md b/docs/custom-remote-caching.md index 7e6e12b3..6b2e33d0 100644 --- a/docs/custom-remote-caching.md +++ b/docs/custom-remote-caching.md @@ -11,9 +11,9 @@ either add a config file by hand or set local environment variables. ## Config file -To enable the remote caching, you must configure it by hand. In fact, the `turbo login` and `turbo link` commands work only with Vercel's remote cache. +To enable remote caching, you must configure it by hand. In fact, the `turbo login` and `turbo link` commands work only with Vercel's remote cache. -First of all, you need to create the config file: +First, you need to create the config file: 1. Create the `.turbo` folder at the root of your repository 2. Create the `config.json` file inside it, and add these two properties: @@ -30,9 +30,9 @@ For example: } ``` Now, you need to add the remote cache server TURBO_TOKEN to your CI pipeline or development machine. There are three ways to do it: -1. Set the `TURBO_TOKEN=yourToken` environment variable -2. Add the token to the `turbo` global config file. You can find or create it inside the `$XDG_CONFIG_HOME/turborepo/config.json`. To know where the `XDG_CONFIG_HOME` is located on your machine, please check out the [xdg-base-directory](https://github.com/adrg/xdg#xdg-base-directory) documentation -3. Modify your project `package.json` scripts by adding the `--token=yourToken` parameter. __Note: this is the less secure way to do it because the token is committed inside the repository. Prefer the other two whenever possible.__ +1. Set the `TURBO_TOKEN=yourToken` environment variable. +2. Add the token to the `turbo` global config file. You can find or create it inside the `$XDG_CONFIG_HOME/turborepo/config.json`. To know where the `XDG_CONFIG_HOME` is located on your machine, please check out the [xdg-base-directory](https://github.com/adrg/xdg#xdg-base-directory) documentation. +3. Modify your project `package.json` scripts by adding the `--token=yourToken` parameter. __Note: This is a less secure way to do it because the token is committed inside the repository. Prefer the other two whenever possible.__ For example: @@ -46,11 +46,11 @@ For example: //... ``` -__Note: The token value must be the same used for your server's `TURBO_TOKEN` env var. See the [environment variables](https://ducktors.github.io/turborepo-remote-cache/environment-variables) section for more info.__ +__Note: The token value must be the same as for your server's `TURBO_TOKEN` env var. See the [environment variables](https://ducktors.github.io/turborepo-remote-cache/environment-variables) section for more info.__ ## Enable remote caching in Docker -To enable remote caching in Docker, you must pass `TURBO_TOKEN` inside Dockerfile and [mount](https://docs.docker.com/build/guide/mounts/#add-bind-mounts) the `.git` folder to enable the turbo caching. The `.git` mount is accessible during the build stage only, and will not be present in the final image. +To enable remote caching in Docker, you must pass `TURBO_TOKEN` inside Dockerfile and [mount](https://docs.docker.com/build/guide/mounts/#add-bind-mounts) the `.git` folder to enable the turbo caching. The `.git` mount is accessible during the build stage only and will not be present in the final image. For example: ``` @@ -65,7 +65,7 @@ RUN --mount=type=bind,source=.git,target=.git \ ## Local environment variables -You can also configure your development machine by setting the following environment variables, instead of using the config file: +You can also configure your development machine by setting the following environment variables instead of using the config file: | Variable | Type | Description | | ------------- | ------ | ----------- | diff --git a/docs/deployment-environments.md b/docs/deployment-environments.md index eb44c0e5..264527e7 100644 --- a/docs/deployment-environments.md +++ b/docs/deployment-environments.md @@ -15,7 +15,7 @@ has_toc: false - [Remoteless with npx](#deploy-remoteless-with-npx) ## Deploy on Vercel -The server can be easily deployed as Vercel Function using the deploy button. +The server can be easily deployed as a Vercel Serverless Function using the deploy button. __Note: Local storage isn't supported for this deployment method.__ @@ -24,7 +24,7 @@ __Note: Local storage isn't supported for this deployment method.__ ## Deploy on Docker You can find the image on the [dockerhub](https://hub.docker.com/r/ducktors/turborepo-remote-cache). -1. create an `.env` file, containing all of the env vars you need. Check [environment variables](https://ducktors.github.io/turborepo-remote-cache/environment-variables) for more info. +1. create an `.env` file containing all the env vars you need. Check [environment variables](https://ducktors.github.io/turborepo-remote-cache/environment-variables) for more info. ```sh NODE_ENV= PORT= @@ -43,7 +43,7 @@ docker run --env-file=.env -p 3000:3000 ducktors/turborepo-remote-cache ``` ## Deploy on DigitalOcean -The server can be easily deployed on DigitalOcean App Service. +The server can be easily deployed on DigitalOcean App Services. __Note: Local storage isn't supported for this deployment method.__ diff --git a/docs/running-in-lambda.md b/docs/running-in-lambda.md index 56517c9a..414ec779 100644 --- a/docs/running-in-lambda.md +++ b/docs/running-in-lambda.md @@ -16,12 +16,12 @@ through creating: - A Lambda Function URL - Configuring your repository to use the new API -## Create S3 Bucket to store artifacts +## Create an S3 Bucket to store artifacts First, create an S3 Bucket with a unique name, such as `turborepo-cache-udaw82`. Leave **Block all public access** ticked to ensure your artifacts remain private. -*Note - to prevent this bucket from growing forever, you may want to create a +*Note: To prevent this bucket from growing forever, you may want to create a **Lifecyle rule** to expire cache objects that are older than a certain number of days.* @@ -68,7 +68,7 @@ created. Click on **Create function**. ### Handler code -Create a new package for your Lambda handler, and add `turborepo-remote-cache` +Create a new package for your Lambda handler and add `turborepo-remote-cache` as a dependency. Your `index.js` handler code should look like this: ```js diff --git a/docs/supported-storage-providers.md b/docs/supported-storage-providers.md index bced3443..000bd77b 100644 --- a/docs/supported-storage-providers.md +++ b/docs/supported-storage-providers.md @@ -25,18 +25,18 @@ For example, you can set environment variables `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ `~/.aws/credentials` with AWS credentials. If running in an AWS Lambda Function, temporary credentials (including an -`AWS_SESSION_TOKEN`) are automatically created and you do not need to manually +`AWS_SESSION_TOKEN`) are automatically created. You do not need to manually configure these. -Specify the region using the `AWS_REGION` environment variable, or in `~/.aws/config`. +Specify the region using the `AWS_REGION` environment variable or in `~/.aws/config`. ### DigitalOcean Spaces DigitalOcean Spaces is an S3-compatible object storage that this project also supports. -1. Create a [Space](https://cloud.digitalocean.com/spaces) -2. Generate a new [spaces access key](https://cloud.digitalocean.com/account/api/spaces) +1. Create a [Space](https://cloud.digitalocean.com/spaces). +2. Generate a new [spaces access key](https://cloud.digitalocean.com/account/api/spaces). 3. Fill in the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables based on the access key you created. 4. Set `AWS_REGION` to `us-east-1` - [Explanation](https://docs.digitalocean.com/products/spaces/how-to/use-aws-sdks/#configure-a-client) 5. Set `STORAGE_PATH` to the name of the Space you created. @@ -46,7 +46,7 @@ DigitalOcean Spaces is an S3-compatible object storage that this project also su ## Google Cloud Storage -1. Create a [bucket](https://console.cloud.google.com/storage/browser) (or use an existing one) +1. Create a [bucket](https://console.cloud.google.com/storage/browser) (or use an existing one). 2. Create a new [service account](https://console.cloud.google.com/iam-admin/serviceaccounts). 3. Grant the role `Storage Object Admin` to the service account on the bucket. ```sh @@ -76,6 +76,6 @@ DigitalOcean Spaces is an S3-compatible object storage that this project also su ## Azure Blob Storage -1. Create a new Blob Storage -2. On "Security + networking" tab, copy one of `Connection string` on "Access keys" blade -3. Set `ABS_CONNECTION_STRING` with Connection string value +1. Create a new Blob Storage. +2. On "Security + networking" tab, copy one of `Connection string` on "Access keys" blade. +3. Set `ABS_CONNECTION_STRING` to the connection string. \ No newline at end of file