Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit 507ccb7

Browse files
committed
docs: Reword sections.
1 parent 251b51b commit 507ccb7

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Node.js plugin
1+
# Node.js ecosystem plugins
22

33
Node.js, npm, pnpm, and yarn WASM plugins for [proto](https://github.com/moonrepo/proto).
44

55
## Installation
66

77
```shell
88
proto install node
9-
proto install npm
9+
proto install npm|pnpm|yarn
1010
```
1111

1212
These plugins are built-in to proto, but if you want to override it with an explicit version, add the following to `.prototools`.
@@ -21,28 +21,46 @@ npm|pnpm|yarn = "source:https://github.com/moonrepo/node-plugin/releases/downloa
2121

2222
All plugins can be configured with a `.prototools` file.
2323

24+
### Node.js
25+
2426
- `bundled-npm` (bool) - When `node` is installed, also install `npm` with the version of npm that came bundled with Node.js. Defaults to `false`.
25-
- `shared-globals-dir` (bool) - EXPERIMENTAL: Global npm, pnpm, or yarn packages are installed to a shared location: `~/.proto/tools/node/globals`. Defaults to `false`.
2627

2728
```toml
2829
[tools.node]
2930
bundled-npm = true
31+
```
32+
33+
### Package managers
34+
35+
- `shared-globals-dir` (bool) - EXPERIMENTAL: Global npm, pnpm, or yarn packages are installed to a shared location: `~/.proto/tools/node/globals`. Defaults to `false`.
36+
37+
```toml
38+
[tools.npm]
3039
shared-globals-dir = true
40+
41+
# [tools.pnpm]
42+
# [tools.yarn]
3143
```
3244

45+
> To execute the shared globals, you'll need to add `~/.proto/tools/node/globals` to `PATH` in your shell.
46+
3347
## Hooks
3448

35-
### Post-install
49+
### Node.js
50+
51+
#### Post-install
3652

37-
After installation and `bundled-npm` is enabled, the version of npm that came bundled with Node.js will also be installed. This functionality can be skipped by passing `--no-bundled-npm` during installation.
53+
After Node.js is installed and `bundled-npm` is enabled, the version of npm that came bundled with Node.js will also be installed. This functionality can also be skipped by passing `--no-bundled-npm` during installation.
3854

3955
```shell
4056
proto install node -- --no-bundled-npm
4157
```
4258

43-
### Pre-run
59+
### Package managers
60+
61+
#### Pre-run
4462

45-
Before a npm/pnpm/yarn command is ran and `shared-globals-dir` is enabled, this hook will modify the arguments or environment variables of the command when installing a global package.
63+
Before a npm/pnpm/yarn command is ran and `shared-globals-dir` is enabled, this hook will modify the arguments or environment variables of the command when installing/removing/etc a global package. Is a no-op for other commands.
4664

4765
npm and yarn will set the `PREFIX` environment variable, while pnpm will set `--global-dir` and `--global-bin-dir` arguments.
4866

0 commit comments

Comments
 (0)