You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 17, 2024. It is now read-only.
All plugins can be configured with a `.prototools` file.
23
23
24
+
### Node.js
25
+
24
26
-`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`.
26
27
27
28
```toml
28
29
[tools.node]
29
30
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]
30
39
shared-globals-dir = true
40
+
41
+
# [tools.pnpm]
42
+
# [tools.yarn]
31
43
```
32
44
45
+
> To execute the shared globals, you'll need to add `~/.proto/tools/node/globals` to `PATH` in your shell.
46
+
33
47
## Hooks
34
48
35
-
### Post-install
49
+
### Node.js
50
+
51
+
#### Post-install
36
52
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.
38
54
39
55
```shell
40
56
proto install node -- --no-bundled-npm
41
57
```
42
58
43
-
### Pre-run
59
+
### Package managers
60
+
61
+
#### Pre-run
44
62
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.
46
64
47
65
npm and yarn will set the `PREFIX` environment variable, while pnpm will set `--global-dir` and `--global-bin-dir` arguments.
0 commit comments