Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-06-30 23:38:18 +0300
committerGar <gar+gh@danger.computer>2021-07-01 00:39:24 +0300
commit9dd32d08e09c21c9a4517161abfc7eed6518faf2 (patch)
tree8843d3c4a06ac3fa8a3cfa3832d9cf886c6d8c5e /docs
parent5f8ccccef9fc19229320df8cbcae9fcea8d31388 (diff)
fix(docs): remove npm package config override
This is no longer possible, as per [rfc 21](https://github.com/npm/rfcs/blob/latest/implemented/0021-reduce-lifecycle-script-environment.md) PR-URL: https://github.com/npm/cli/pull/3485 Credit: @wraithgar Close: #3485 Reviewed-by: @isaacs
Diffstat (limited to 'docs')
-rw-r--r--docs/content/configuring-npm/package-json.md8
-rw-r--r--docs/content/using-npm/scripts.md36
2 files changed, 3 insertions, 41 deletions
diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md
index 3ed039902..5cacf68ba 100644
--- a/docs/content/configuring-npm/package-json.md
+++ b/docs/content/configuring-npm/package-json.md
@@ -549,12 +549,8 @@ had the following:
}
```
-and then had a "start" command that then referenced the
-`npm_package_config_port` environment variable, then the user could
-override that by doing `npm config set foo:port 8001`.
-
-See [`config`](/using-npm/config) and [`scripts`](/using-npm/scripts) for
-more on package configs.
+It could also have a "start" command that referenced the
+`npm_package_config_port` environment variable.
### dependencies
diff --git a/docs/content/using-npm/scripts.md b/docs/content/using-npm/scripts.md
index 3869334f6..2072d36c9 100644
--- a/docs/content/using-npm/scripts.md
+++ b/docs/content/using-npm/scripts.md
@@ -245,41 +245,7 @@ package.json file, then your package scripts would have the
in your code with `process.env.npm_package_name` and
`process.env.npm_package_version`, and so on for other fields.
-#### configuration
-
-Configuration parameters are put in the environment with the
-`npm_config_` prefix. For instance, you can view the effective `root`
-config by checking the `npm_config_root` environment variable.
-
-#### Special: package.json "config" object
-
-The package.json "config" keys are overwritten in the environment if
-there is a config param of `<name>[@<version>]:<key>`. For example,
-if the package.json has this:
-
-```json
-{
- "name" : "foo",
- "config" : {
- "port" : "8080"
- },
- "scripts" : {
- "start" : "node server.js"
- }
-}
-```
-
-and the server.js is this:
-
-```javascript
-http.createServer(...).listen(process.env.npm_package_config_port)
-```
-
-then the user could change the behavior by doing:
-
-```bash
- npm config set foo:port 80
- ```
+See [`package-json.md`](/using-npm/package-json) for more on package configs.
#### current lifecycle event