Skip to content

Commit 17e154c

Browse files
Max Blackowlstronaut
authored andcommitted
docs: standardize env vars to uppercase convention
1 parent 1e51a25 commit 17e154c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/lib/content/commands/npm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ In particular, npm has two modes of operation:
6060
npm installs packages into the current project directory, which defaults to the current working directory.
6161
Packages install to `./node_modules`, and bins to `./node_modules/.bin`.
6262
* global mode:
63-
npm installs packages into the install prefix at `$npm_config_prefix/lib/node_modules` and bins to `$npm_config_prefix/bin`.
63+
npm installs packages into the install prefix at `$NPM_CONFIG_PREFIX/lib/node_modules` and bins to `$NPM_CONFIG_PREFIX/bin`.
6464

6565
Local mode is the default.
6666
Use `-g` or `--global` on any command to run in global mode instead.
@@ -94,8 +94,8 @@ It reads its configuration options from 5 places.
9494
All keys take a value, even if they are booleans (the config parser doesn't know what the options are at the time of parsing).
9595
If you do not provide a value (`--key`) then the option is set to boolean `true`.
9696
* Environment Variables:
97-
Set any config by prefixing the name in an environment variable with `npm_config_`.
98-
For example, `export npm_config_key=val`.
97+
Set any config by prefixing the name in an environment variable with `NPM_CONFIG_`.
98+
For example, `export NPM_CONFIG_KEY=val`.
9999
* User Configs:
100100
The file at `$HOME/.npmrc` is an ini-formatted list of configs.
101101
If present, it is parsed.

docs/lib/content/using-npm/scripts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ They just have to be some kind of executable file.
333333
Read through [`package.json`](/configuring-npm/package-json) to see all the things that you can specify and enable by simply describing your package appropriately.
334334
In general, this will lead to a more robust and consistent state.
335335
* Inspect the env to determine where to put things.
336-
For instance, if the `npm_config_binroot` environment variable is set to `/home/user/bin`, then don't try to install executables into `/usr/local/bin`.
336+
For instance, if the `NPM_CONFIG_BINROOT` environment variable is set to `/home/user/bin`, then don't try to install executables into `/usr/local/bin`.
337337
The user probably set it up that way for a reason.
338338
* Don't prefix your script commands with "sudo". If root permissions are required for some reason, then it'll fail with that error, and the user will sudo the npm command in question.
339339
* Don't use `install`.

0 commit comments

Comments
 (0)