File tree 2 files changed +3
-41
lines changed
2 files changed +3
-41
lines changed Original file line number Diff line number Diff line change @@ -549,12 +549,8 @@ had the following:
549
549
}
550
550
```
551
551
552
- and then had a "start" command that then referenced the
553
- ` npm_package_config_port ` environment variable, then the user could
554
- override that by doing ` npm config set foo:port 8001 ` .
555
-
556
- See [ ` config ` ] ( /using-npm/config ) and [ ` scripts ` ] ( /using-npm/scripts ) for
557
- more on package configs.
552
+ It could also have a "start" command that referenced the
553
+ ` npm_package_config_port ` environment variable.
558
554
559
555
### dependencies
560
556
Original file line number Diff line number Diff line change @@ -245,41 +245,7 @@ package.json file, then your package scripts would have the
245
245
in your code with ` process.env.npm_package_name ` and
246
246
` process.env.npm_package_version ` , and so on for other fields.
247
247
248
- #### configuration
249
-
250
- Configuration parameters are put in the environment with the
251
- ` npm_config_ ` prefix. For instance, you can view the effective ` root `
252
- config by checking the ` npm_config_root ` environment variable.
253
-
254
- #### Special: package.json "config" object
255
-
256
- The package.json "config" keys are overwritten in the environment if
257
- there is a config param of ` <name>[@<version>]:<key> ` . For example,
258
- if the package.json has this:
259
-
260
- ``` json
261
- {
262
- "name" : " foo" ,
263
- "config" : {
264
- "port" : " 8080"
265
- },
266
- "scripts" : {
267
- "start" : " node server.js"
268
- }
269
- }
270
- ```
271
-
272
- and the server.js is this:
273
-
274
- ``` javascript
275
- http .createServer (... ).listen (process .env .npm_package_config_port )
276
- ```
277
-
278
- then the user could change the behavior by doing:
279
-
280
- ``` bash
281
- npm config set foo:port 80
282
- ```
248
+ See [ ` package-json.md ` ] ( /using-npm/package-json ) for more on package configs.
283
249
284
250
#### current lifecycle event
285
251
You can’t perform that action at this time.
0 commit comments