-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update docs with bun and pnpm (#142)
* docs: update docs with bun and pnpm * move warning box about node_modules not cached
- Loading branch information
Showing
6 changed files
with
68 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Node/Bun version | ||
|
||
To make all workflows generated by SCI as consistent as possible, each of them has a step | ||
where specific version of node or bun is set. It should look more or less like this: | ||
|
||
```yaml | ||
- name: 🌿 Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "yarn" | ||
``` | ||
in case your package manager is `npm`, `yarn` or `pnpm`, and like this: | ||
|
||
```yaml | ||
- name: 🥟 Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version-file: ".bun-version" : | ||
``` | ||
|
||
if your project uses `bun`. | ||
|
||
For more information, check [actions/setup-node](https://github.com/actions/setup-node) | ||
and [actions/setup-bun](https://github.com/oven-sh/setup-bun). | ||
|
||
## Caching global package manager data | ||
|
||
Note the field `cache` in setup step. It is set to your package manager to enable caching of global packages data. | ||
|
||
:::caution | ||
`node_modules` is not cached. | ||
::: | ||
|
||
## Node version file | ||
|
||
The `node-version-file` field will be set to point to a file in your repository from which | ||
node version should be retrieved. Possible values are: | ||
|
||
- `.nvmrc` if exists, | ||
- `.node-version` if exists, | ||
- `package.json`, if either `engines.node` or `volta.node` fields are specified. | ||
|
||
If SCI fails to detect files satisfying these conditions, it will create `.nvmrc` file in your project with | ||
default node version. | ||
|
||
Also, the workflow step will have the field `cache` set to your package manager to enable global packages data caching. | ||
|
||
## Bun version file | ||
|
||
Similarly to how SCI detects node version and creates `.nvmrc` file in case of failure, if your | ||
projects uses `bun` and SCI fails to detect `.bun-version` file, it will create it with default bun version, | ||
which will be provided in generated workflows in the `bun-version-file` field. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters