Skip to content

Commit

Permalink
Update set up instructions and pnpm dependencies (dart-lang#5531)
Browse files Browse the repository at this point in the history
Updated the README to make it clear that `corepack` is not required,
it's just an easy way to install `pnpm` and match the version required
by the current project.

Also update default pnpm version and various transitive dependencies,
including some fixes for 11ty dev server.
  • Loading branch information
parlough authored and Tony Sansone committed Mar 22, 2024
1 parent 8257333 commit af34879
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 110 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ The latest stable LTS release of Node.js is required to build the site.
If you don't have Node.js or need to update, download your
computer's corresponding version and follow the instructions
from the [Node.js download archive][].
If you prefer, you can use a version manager such as [nvm][].
If you prefer, you can use a version manager such as [nvm][],
and run `nvm install` from the repository's root directory.

If you already have Node installed, verify it's available on your path
and already the latest stable version _(`20` or later)_:
Expand Down Expand Up @@ -137,21 +138,25 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
dart pub get
```

3. From the root directory of the repository,
enable [`corepack`][] to set up [`pnpm`][].
`corepack` comes bundled with Node and `pnpm`
is an alternative, efficient package manager for npm packages.
If you already have `pnpm` installed or installed it a different way,
you can skip the `corepack` commands.
3. Install [`pnpm`][] using your preferred [installation method][pnpm-install].
`pnpm` is an alternative, efficient package manager for npm packages.
If you already have `pnpm`, verify you have the latest stable version.
We recommend using [`corepack`][] to install and manage `pnpm` versions,
since it is bundled with most installations of Node.

If you haven't used `corepack` before, you'll need to
first enable it with `corepack enable`.
Then, to install the correct `pnpm` version, from the
root directory of the repository, run `corepack install`:

```terminal
corepack enable
corepack install
```

4. Once you have `pnpm` installed and setup,
fetch the site's npm dependencies.
We recommend you use `pnpm`, but you can also use `npm`.
fetch the site's npm dependencies using `pnpm install`.
We highly recommend you use `pnpm`, but you can also use `npm`.

```terminal
pnpm install
Expand Down Expand Up @@ -191,6 +196,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
[`corepack`]: https://nodejs.org/api/corepack.html
[`pnpm`]: https://pnpm.io/
[pnpm-install]: https://pnpm.io/installation

## Validate your changes

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"node": ">=20.10.0",
"pnpm": ">=8.14.1"
},
"packageManager": "pnpm@8.14.3",
"packageManager": "pnpm@8.15.1",
"dependencies": {
"bootstrap-scss": "^4.6.2"
},
Expand Down
Loading

0 comments on commit af34879

Please sign in to comment.