https://github.com/jonahsnider/netlify-plugin-cache-yarn2
Save the Yarn 2 cache folder between Netlify builds
https://github.com/jonahsnider/netlify-plugin-cache-yarn2
Last synced: 6 months ago
JSON representation
Save the Yarn 2 cache folder between Netlify builds
- Host: GitHub
- URL: https://github.com/jonahsnider/netlify-plugin-cache-yarn2
- Owner: jonahsnider
- Archived: true
- Created: 2021-01-18T00:46:28.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-10T07:13:20.000Z (almost 4 years ago)
- Last Synced: 2024-12-31T19:45:30.039Z (6 months ago)
- Language: TypeScript
- Size: 5.48 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# [Netlify Yarn 2 cache](https://app.netlify.com/plugins/netlify-plugin-cache-yarn2/install)
Save the Yarn 2 cache folder between Netlify builds.
[](https://app.netlify.com/plugins/netlify-plugin-cache-yarn2/install)
[](https://www.npmjs.com/package/netlify-plugin-cache-yarn2)
[](https://www.npmjs.com/package/netlify-plugin-cache-yarn2)
[](https://github.com/jonahsnider/netlify-plugin-cache-yarn2/actions)A [Netlify build plugin](https://docs.netlify.com/configure-builds/build-plugins/).
## Usage
This is a Netlify build plugin, which will run during your Netlify builds. You can learn more about Netlify Build Plugins in the [Netlify docs](https://docs.netlify.com/configure-builds/build-plugins/).
If you want to manually install the plugin add the following lines to your `netlify.toml` file:
```toml
[[plugins]]
package = "netlify-plugin-cache-yarn2"
```Next, from your project's base directory, use a package manager to add this plugin to `devDependencies` in `package.json`.
```sh
yarn add -D netlify-plugin-cache-yarn2
```If you want to configure the plugin, you can do this in your `netlify.toml` file:
```toml
[[plugins]]
package = "netlify-plugin-cache-yarn2"
[plugins.inputs]
# The path to the Yarn lockfile
# Default is yarn.lock
build_dir_path = "frontend/yarn.lock"
```Note: The `[[plugins]]` line is required for each plugin, even if you have other plugins in your `netlify.toml` file already.