@@ -109,33 +109,6 @@ npm ls -gpld
109
109
npm ls --global --parseable --long --loglevel info
110
110
```
111
111
112
- ### Per-Package Config Settings
113
-
114
- When running scripts (see [ ` scripts ` ] ( /using-npm/scripts ) ) the package.json "config"
115
- keys are overwritten in the environment if there is a config param of
116
- ` <name>[@<version>]:<key> ` . For example, if the package.json has
117
- this:
118
-
119
- ``` json
120
- { "name" : " foo"
121
- , "config" : { "port" : " 8080" }
122
- , "scripts" : { "start" : " node server.js" } }
123
- ```
124
-
125
- and the server.js is this:
126
-
127
- ``` javascript
128
- http .createServer (... ).listen (process .env .npm_package_config_port )
129
- ```
130
-
131
- then the user could change the behavior by doing:
132
-
133
- ``` bash
134
- npm config set foo:port 80
135
- ```
136
-
137
- See [ package.json] ( /configuring-npm/package-json ) for more information.
138
-
139
112
### Config Settings
140
113
141
114
#### access
@@ -325,6 +298,18 @@ Number of ms to wait for cache lock files to expire.
325
298
326
299
` --cache-min=9999 (or bigger) ` is an alias for ` --prefer-offline ` .
327
300
301
+ #### call
302
+
303
+ * Default: ""
304
+ * Type: String
305
+
306
+ Optional companion option for ` npm exec ` , ` npx ` that allows for specifying a
307
+ custom command to be run along with the installed packages.
308
+
309
+ ``` bash
310
+ npm exec --package yo --package generator-node --call " yo node"
311
+ ```
312
+
328
313
#### cert
329
314
330
315
* Default: ` null `
@@ -346,6 +331,13 @@ It is _not_ the path to a certificate file (and there is no "certfile" option).
346
331
347
332
This is a list of CIDR address to be used when configuring limited access tokens with the ` npm token create ` command.
348
333
334
+ #### commit-hooks
335
+
336
+ * Default: ` true `
337
+ * Type: Boolean
338
+
339
+ Run git commit hooks when using the ` npm version ` command.
340
+
349
341
#### color
350
342
351
343
* Default: true
@@ -359,12 +351,12 @@ disabled when the environment variable `NO_COLOR` is set to any value.
359
351
360
352
#### depth
361
353
362
- * Default: 0
363
- * Type: Number
354
+ * Default: null
355
+ * Type: null or Number
364
356
365
357
The depth to go when recursing packages for ` npm ls ` .
366
358
367
- To make this default to ` Infinity ` instead of ` 0 ` , set ` --all ` .
359
+ To make this default to ` Infinity ` instead of ` null ` , set ` --all ` .
368
360
369
361
#### description
370
362
@@ -378,7 +370,7 @@ Show the description in `npm search`
378
370
* Default: false
379
371
* Type: Boolean
380
372
381
- Install ` dev-dependencies ` along with packages.
373
+ \[ Deprecated \] Install ` dev-dependencies ` along with packages.
382
374
383
375
#### dry-run
384
376
@@ -438,6 +430,15 @@ recommended that you do not use this option!
438
430
439
431
Format ` package-lock.json ` or ` npm-shrinkwrap.json ` as a human readable file.
440
432
433
+ #### fund
434
+
435
+ * Default: true
436
+ * Type: Boolean
437
+
438
+ When "true" displays the message at the end of each ` npm install `
439
+ aknowledging the number of dependencies looking for funding.
440
+ See [ ` npm fund ` ] ( /cli-commands/fund ) for details.
441
+
441
442
#### fetch-retries
442
443
443
444
* Default: 2
@@ -477,15 +478,6 @@ packages.
477
478
478
479
The maximum amount of time to wait for HTTP requests to complete.
479
480
480
- #### fund
481
-
482
- * Default: true
483
- * Type: Boolean
484
-
485
- When "true" displays the message at the end of each ` npm install `
486
- aknowledging the number of dependencies looking for funding.
487
- See [ ` npm fund ` ] ( /cli-commands/fund ) for details.
488
-
489
481
#### git
490
482
491
483
* Default: ` "git" `
@@ -502,13 +494,6 @@ the git binary.
502
494
503
495
Tag the commit when using the ` npm version ` command.
504
496
505
- #### commit-hooks
506
-
507
- * Default: ` true `
508
- * Type: Boolean
509
-
510
- Run git commit hooks when using the ` npm version ` command.
511
-
512
497
#### global
513
498
514
499
* Default: false
@@ -542,14 +527,6 @@ on will be flattened in their `node_modules` folders. This obviously will
542
527
eliminate some deduping. If used with ` legacy-bundling ` , ` legacy-bundling ` will be
543
528
preferred.
544
529
545
- #### group
546
-
547
- * Default: GID of the current process
548
- * Type: String or Number
549
-
550
- The group to use when running package scripts in global mode as the root
551
- user.
552
-
553
530
#### heading
554
531
555
532
* Default: ` "npm" `
@@ -591,46 +568,59 @@ If true, npm will not run `prepublish` scripts.
591
568
592
569
If true, npm does not run scripts specified in package.json files.
593
570
571
+ #### include
572
+
573
+ * Default: ` [prod|dev|optional|peer] `
574
+ * Type: Array
575
+
576
+ Option that allows for defining which types of dependencies to install.
577
+
594
578
#### init-module
595
579
580
+ * Alias: ` init.module `
596
581
* Default: ~ /.npm-init.js
597
582
* Type: path
598
583
599
584
A module that will be loaded by the ` npm init ` command. See the
600
585
documentation for the
601
- [ init-package-json] ( https://github.com/isaacs /init-package-json ) module
586
+ [ init-package-json] ( https://github.com/npm /init-package-json ) module
602
587
for more information, or [ npm init] ( /cli-commands/init ) .
603
588
604
589
#### init-author-name
605
590
591
+ * Alias: ` init.author.name `
606
592
* Default: ""
607
593
* Type: String
608
594
609
595
The value ` npm init ` should use by default for the package author's name.
610
596
611
597
#### init-author-email
612
598
599
+ * Alias: ` init.author.email `
613
600
* Default: ""
614
601
* Type: String
615
602
616
603
The value ` npm init ` should use by default for the package author's email.
617
604
618
605
#### init-author-url
619
606
607
+ * Alias: ` init.author.url `
620
608
* Default: ""
621
609
* Type: String
622
610
623
611
The value ` npm init ` should use by default for the package author's homepage.
624
612
625
613
#### init-license
626
614
615
+ * Alias: ` init.license `
627
616
* Default: "ISC"
628
617
* Type: String
629
618
630
619
The value ` npm init ` should use by default for the package license.
631
620
632
621
#### init-version
633
622
623
+ * Alias: ` init.version `
634
624
* Default: "1.0.0"
635
625
* Type: semver
636
626
@@ -1247,15 +1237,6 @@ on success, but left behind on failure for forensic purposes.
1247
1237
When set to true, npm uses unicode characters in the tree output. When
1248
1238
false, it uses ascii characters to draw trees.
1249
1239
1250
- #### unsafe-perm
1251
-
1252
- * Default: false if running as root, true otherwise
1253
- * Type: Boolean
1254
-
1255
- Set to true to suppress the UID/GID switching when running package
1256
- scripts. If set explicitly to false, then installing as a non-root user
1257
- will fail.
1258
-
1259
1240
#### update-notifier
1260
1241
1261
1242
* Default: true
@@ -1272,13 +1253,6 @@ version of npm than the latest.
1272
1253
Set to show short usage output (like the -H output)
1273
1254
instead of complete help when doing [ ` npm help ` ] ( /cli-commands/help ) .
1274
1255
1275
- #### user
1276
-
1277
- * Default: "nobody"
1278
- * Type: String or Number
1279
-
1280
- The UID to set to when running package scripts as root.
1281
-
1282
1256
#### userconfig
1283
1257
1284
1258
* Default: ~ /.npmrc
0 commit comments