]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/doc/misc/npm-config.md
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / doc / misc / npm-config.md
1 npm-config(7) -- More than you probably want to know about npm configuration
2 ============================================================================
3
4 ## DESCRIPTION
5
6 npm gets its configuration values from the following sources, sorted by priority:
7
8 ### Command Line Flags
9
10 Putting `--foo bar` on the command line sets the `foo` configuration
11 parameter to `"bar"`.  A `--` argument tells the cli parser to stop
12 reading flags.  A `--flag` parameter that is at the *end* of the
13 command will be given the value of `true`.
14
15 ### Environment Variables
16
17 Any environment variables that start with `npm_config_` will be
18 interpreted as a configuration parameter.  For example, putting
19 `npm_config_foo=bar` in your environment will set the `foo`
20 configuration parameter to `bar`.  Any environment configurations that
21 are not given a value will be given the value of `true`.  Config
22 values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the
23 same.
24
25 ### npmrc Files
26
27 The four relevant files are:
28
29 * per-project configuration file (`/path/to/my/project/.npmrc`)
30 * per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI
31   option `--userconfig` or environment variable `$NPM_CONF_USERCONFIG`)
32 * global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via
33   CLI option `--globalconfig` or environment variable `$NPM_CONF_GLOBALCONFIG`)
34 * npm's built-in configuration file (`/path/to/npm/npmrc`)
35
36 See npmrc(5) for more details.
37
38 ### Default Configs
39
40 A set of configuration parameters that are internal to npm, and are
41 defaults if nothing else is specified.
42
43 ## Shorthands and Other CLI Niceties
44
45 The following shorthands are parsed on the command-line:
46
47 * `-v`: `--version`
48 * `-h`, `-?`, `--help`, `-H`: `--usage`
49 * `-s`, `--silent`: `--loglevel silent`
50 * `-q`, `--quiet`: `--loglevel warn`
51 * `-d`: `--loglevel info`
52 * `-dd`, `--verbose`: `--loglevel verbose`
53 * `-ddd`: `--loglevel silly`
54 * `-g`: `--global`
55 * `-C`: `--prefix`
56 * `-l`: `--long`
57 * `-m`: `--message`
58 * `-p`, `--porcelain`: `--parseable`
59 * `-reg`: `--registry`
60 * `-f`: `--force`
61 * `-desc`: `--description`
62 * `-S`: `--save`
63 * `-D`: `--save-dev`
64 * `-O`: `--save-optional`
65 * `-B`: `--save-bundle`
66 * `-E`: `--save-exact`
67 * `-y`: `--yes`
68 * `-n`: `--yes false`
69 * `ll` and `la` commands: `ls --long`
70
71 If the specified configuration param resolves unambiguously to a known
72 configuration parameter, then it is expanded to that configuration
73 parameter.  For example:
74
75     npm ls --par
76     # same as:
77     npm ls --parseable
78
79 If multiple single-character shorthands are strung together, and the
80 resulting combination is unambiguously not some other configuration
81 param, then it is expanded to its various component pieces.  For
82 example:
83
84     npm ls -gpld
85     # same as:
86     npm ls --global --parseable --long --loglevel info
87
88 ## Per-Package Config Settings
89
90 When running scripts (see `npm-scripts(7)`) the package.json "config"
91 keys are overwritten in the environment if there is a config param of
92 `<name>[@<version>]:<key>`.  For example, if the package.json has
93 this:
94
95     { "name" : "foo"
96     , "config" : { "port" : "8080" }
97     , "scripts" : { "start" : "node server.js" } }
98
99 and the server.js is this:
100
101     http.createServer(...).listen(process.env.npm_package_config_port)
102
103 then the user could change the behavior by doing:
104
105     npm config set foo:port 80
106
107 See package.json(5) for more information.
108
109 ## Config Settings
110
111 ### access
112
113 * Default: `restricted`
114 * Type: Access
115
116 When publishing scoped packages, the access level defaults to `restricted`.  If
117 you want your scoped package to be publicly viewable (and installable) set
118 `--access=public`. The only valid values for `access` are `public` and
119 `restricted`. Unscoped packages _always_ have an access level of `public`.
120
121 ### always-auth
122
123 * Default: false
124 * Type: Boolean
125
126 Force npm to always require authentication when accessing the registry,
127 even for `GET` requests.
128
129 ### bin-links
130
131 * Default: `true`
132 * Type: Boolean
133
134 Tells npm to create symlinks (or `.cmd` shims on Windows) for package
135 executables.
136
137 Set to false to have it not do this.  This can be used to work around
138 the fact that some file systems don't support symlinks, even on
139 ostensibly Unix systems.
140
141 ### browser
142
143 * Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
144 * Type: String
145
146 The browser that is called by the `npm docs` command to open websites.
147
148 ### ca
149
150 * Default: The npm CA certificate
151 * Type: String, Array or null
152
153 The Certificate Authority signing certificate that is trusted for SSL
154 connections to the registry. Values should be in PEM format with newlines
155 replaced by the string "\n". For example:
156
157     ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
158
159 Set to `null` to only allow "known" registrars, or to a specific CA cert
160 to trust only that specific signing authority.
161
162 Multiple CAs can be trusted by specifying an array of certificates:
163
164     ca[]="..."
165     ca[]="..."
166
167 See also the `strict-ssl` config.
168
169 ### cafile
170
171 * Default: `null`
172 * Type: path
173
174 A path to a file containing one or multiple Certificate Authority signing
175 certificates. Similar to the `ca` setting, but allows for multiple CA's, as
176 well as for the CA information to be stored in a file on disk.
177
178 ### cache
179
180 * Default: Windows: `%AppData%\npm-cache`, Posix: `~/.npm`
181 * Type: path
182
183 The location of npm's cache directory.  See `npm-cache(1)`
184
185 ### cache-lock-stale
186
187 * Default: 60000 (1 minute)
188 * Type: Number
189
190 The number of ms before cache folder lockfiles are considered stale.
191
192 ### cache-lock-retries
193
194 * Default: 10
195 * Type: Number
196
197 Number of times to retry to acquire a lock on cache folder lockfiles.
198
199 ### cache-lock-wait
200
201 * Default: 10000 (10 seconds)
202 * Type: Number
203
204 Number of ms to wait for cache lock files to expire.
205
206 ### cache-max
207
208 * Default: Infinity
209 * Type: Number
210
211 The maximum time (in seconds) to keep items in the registry cache before
212 re-checking against the registry.
213
214 Note that no purging is done unless the `npm cache clean` command is
215 explicitly used, and that only GET requests use the cache.
216
217 ### cache-min
218
219 * Default: 10
220 * Type: Number
221
222 The minimum time (in seconds) to keep items in the registry cache before
223 re-checking against the registry.
224
225 Note that no purging is done unless the `npm cache clean` command is
226 explicitly used, and that only GET requests use the cache.
227
228 ### cert
229
230 * Default: `null`
231 * Type: String
232
233 A client certificate to pass when accessing the registry.  Values should be in
234 PEM format with newlines replaced by the string "\n". For example:
235
236     cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
237
238 It is _not_ the path to a certificate file (and there is no "certfile" option).
239
240 ### color
241
242 * Default: true
243 * Type: Boolean or `"always"`
244
245 If false, never shows colors.  If `"always"` then always shows colors.
246 If true, then only prints color codes for tty file descriptors.
247
248 ### depth
249
250 * Default: Infinity
251 * Type: Number
252
253 The depth to go when recursing directories for `npm ls`,
254 `npm cache ls`, and `npm outdated`.
255
256 For `npm outdated`, a setting of `Infinity` will be treated as `0`
257 since that gives more useful information.  To show the outdated status
258 of all packages and dependents, use a large integer value,
259 e.g., `npm outdated --depth 9999`
260
261 ### description
262
263 * Default: true
264 * Type: Boolean
265
266 Show the description in `npm search`
267
268 ### dev
269
270 * Default: false
271 * Type: Boolean
272
273 Install `dev-dependencies` along with packages.
274
275 Note that `dev-dependencies` are also installed if the `npat` flag is
276 set.
277
278 ### editor
279
280 * Default: `EDITOR` environment variable if set, or `"vi"` on Posix,
281   or `"notepad"` on Windows.
282 * Type: path
283
284 The command to run for `npm edit` or `npm config edit`.
285
286 ### engine-strict
287
288 * Default: false
289 * Type: Boolean
290
291 If set to true, then npm will stubbornly refuse to install (or even
292 consider installing) any package that claims to not be compatible with
293 the current Node.js version.
294
295 ### force
296
297 * Default: false
298 * Type: Boolean
299
300 Makes various commands more forceful.
301
302 * lifecycle script failure does not block progress.
303 * publishing clobbers previously published versions.
304 * skips cache when requesting from the registry.
305 * prevents checks against clobbering non-npm files.
306
307 ### fetch-retries
308
309 * Default: 2
310 * Type: Number
311
312 The "retries" config for the `retry` module to use when fetching
313 packages from the registry.
314
315 ### fetch-retry-factor
316
317 * Default: 10
318 * Type: Number
319
320 The "factor" config for the `retry` module to use when fetching
321 packages.
322
323 ### fetch-retry-mintimeout
324
325 * Default: 10000 (10 seconds)
326 * Type: Number
327
328 The "minTimeout" config for the `retry` module to use when fetching
329 packages.
330
331 ### fetch-retry-maxtimeout
332
333 * Default: 60000 (1 minute)
334 * Type: Number
335
336 The "maxTimeout" config for the `retry` module to use when fetching
337 packages.
338
339 ### git
340
341 * Default: `"git"`
342 * Type: String
343
344 The command to use for git commands.  If git is installed on the
345 computer, but is not in the `PATH`, then set this to the full path to
346 the git binary.
347
348 ### git-tag-version
349
350 * Default: `true`
351 * Type: Boolean
352
353 Tag the commit when using the `npm version` command.
354
355 ### global
356
357 * Default: false
358 * Type: Boolean
359
360 Operates in "global" mode, so that packages are installed into the
361 `prefix` folder instead of the current working directory.  See
362 `npm-folders(5)` for more on the differences in behavior.
363
364 * packages are installed into the `{prefix}/lib/node_modules` folder, instead of the
365   current working directory.
366 * bin files are linked to `{prefix}/bin`
367 * man pages are linked to `{prefix}/share/man`
368
369 ### globalconfig
370
371 * Default: {prefix}/etc/npmrc
372 * Type: path
373
374 The config file to read for global config options.
375
376 ### group
377
378 * Default: GID of the current process
379 * Type: String or Number
380
381 The group to use when running package scripts in global mode as the root
382 user.
383
384 ### heading
385
386 * Default: `"npm"`
387 * Type: String
388
389 The string that starts all the debugging log output.
390
391 ### https-proxy
392
393 * Default: null
394 * Type: url
395
396 A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
397 `https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,
398 proxy settings will be honored by the underlying `request` library.
399
400 ### if-present
401
402 * Default: false
403 * Type: Boolean
404
405 If true, npm will not exit with an error code when `run-script` is invoked for
406 a script that isn't defined in the `scripts` section of `package.json`. This
407 option can be used when it's desirable to optionally run a script when it's
408 present and fail if the script fails. This is useful, for example, when running
409 scripts that may only apply for some builds in an otherwise generic CI setup.
410
411 ### ignore-scripts
412
413 * Default: false
414 * Type: Boolean
415
416 If true, npm does not run scripts specified in package.json files.
417
418 ### init-module
419
420 * Default: ~/.npm-init.js
421 * Type: path
422
423 A module that will be loaded by the `npm init` command.  See the
424 documentation for the
425 [init-package-json](https://github.com/isaacs/init-package-json) module
426 for more information, or npm-init(1).
427
428 ### init-author-name
429
430 * Default: ""
431 * Type: String
432
433 The value `npm init` should use by default for the package author's name.
434
435 ### init-author-email
436
437 * Default: ""
438 * Type: String
439
440 The value `npm init` should use by default for the package author's email.
441
442 ### init-author-url
443
444 * Default: ""
445 * Type: String
446
447 The value `npm init` should use by default for the package author's homepage.
448
449 ### init-license
450
451 * Default: "ISC"
452 * Type: String
453
454 The value `npm init` should use by default for the package license.
455
456 ### init-version
457
458 * Default: "1.0.0"
459 * Type: semver
460
461 The value that `npm init` should use by default for the package
462 version number, if not already set in package.json.
463
464 ### json
465
466 * Default: false
467 * Type: Boolean
468
469 Whether or not to output JSON data, rather than the normal output.
470
471 This feature is currently experimental, and the output data structures
472 for many commands is either not implemented in JSON yet, or subject to
473 change.  Only the output from `npm ls --json` is currently valid.
474
475 ### key
476
477 * Default: `null`
478 * Type: String
479
480 A client key to pass when accessing the registry.  Values should be in PEM
481 format with newlines replaced by the string "\n". For example:
482
483     key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
484
485 It is _not_ the path to a key file (and there is no "keyfile" option).
486
487 ### link
488
489 * Default: false
490 * Type: Boolean
491
492 If true, then local installs will link if there is a suitable globally
493 installed package.
494
495 Note that this means that local installs can cause things to be
496 installed into the global space at the same time.  The link is only done
497 if one of the two conditions are met:
498
499 * The package is not already installed globally, or
500 * the globally installed version is identical to the version that is
501   being installed locally.
502
503 ### local-address
504
505 * Default: undefined
506 * Type: IP Address
507
508 The IP address of the local interface to use when making connections
509 to the npm registry.  Must be IPv4 in versions of Node prior to 0.12.
510
511 ### loglevel
512
513 * Default: "warn"
514 * Type: String
515 * Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
516
517 What level of logs to report.  On failure, *all* logs are written to
518 `npm-debug.log` in the current working directory.
519
520 Any logs of a higher level than the setting are shown.
521 The default is "warn", which shows warn and error output.
522
523 ### logstream
524
525 * Default: process.stderr
526 * Type: Stream
527
528 This is the stream that is passed to the
529 [npmlog](https://github.com/npm/npmlog) module at run time.
530
531 It cannot be set from the command line, but if you are using npm
532 programmatically, you may wish to send logs to somewhere other than
533 stderr.
534
535 If the `color` config is set to true, then this stream will receive
536 colored output if it is a TTY.
537
538 ### long
539
540 * Default: false
541 * Type: Boolean
542
543 Show extended information in `npm ls` and `npm search`.
544
545 ### maxsockets
546
547 * Default: 50
548 * Type: Number
549
550 The maximum number of connections to use per origin (protocol/host/port
551 combination). Passed to the `http` `Agent` used to make the request.
552
553 ### message
554
555 * Default: "%s"
556 * Type: String
557
558 Commit message which is used by `npm version` when creating version commit.
559
560 Any "%s" in the message will be replaced with the version number.
561
562 ### node-version
563
564 * Default: process.version
565 * Type: semver or false
566
567 The node version to use when checking a package's `engines` map.
568
569 ### npat
570
571 * Default: false
572 * Type: Boolean
573
574 Run tests on installation.
575
576 ### onload-script
577
578 * Default: false
579 * Type: path
580
581 A node module to `require()` when npm loads.  Useful for programmatic
582 usage.
583
584 ### optional
585
586 * Default: true
587 * Type: Boolean
588
589 Attempt to install packages in the `optionalDependencies` object.  Note
590 that if these packages fail to install, the overall installation
591 process is not aborted.
592
593 ### parseable
594
595 * Default: false
596 * Type: Boolean
597
598 Output parseable results from commands that write to
599 standard output.
600
601 ### prefix
602
603 * Default: see npm-folders(5)
604 * Type: path
605
606 The location to install global items.  If set on the command line, then
607 it forces non-global commands to run in the specified folder.
608
609 ### production
610
611 * Default: false
612 * Type: Boolean
613
614 Set to true to run in "production" mode.
615
616 1. devDependencies are not installed at the topmost level when running
617    local `npm install` without any arguments.
618 2. Set the NODE_ENV="production" for lifecycle scripts.
619
620 ### proprietary-attribs
621
622 * Default: true
623 * Type: Boolean
624
625 Whether or not to include proprietary extended attributes in the
626 tarballs created by npm.
627
628 Unless you are expecting to unpack package tarballs with something other
629 than npm -- particularly a very outdated tar implementation -- leave
630 this as true.
631
632 ### proxy
633
634 * Default: null
635 * Type: url
636
637 A proxy to use for outgoing http requests. If the `HTTP_PROXY` or
638 `http_proxy` environment variables are set, proxy settings will be
639 honored by the underlying `request` library.
640
641 ### rebuild-bundle
642
643 * Default: true
644 * Type: Boolean
645
646 Rebuild bundled dependencies after installation.
647
648 ### registry
649
650 * Default: https://registry.npmjs.org/
651 * Type: url
652
653 The base URL of the npm package registry.
654
655 ### rollback
656
657 * Default: true
658 * Type: Boolean
659
660 Remove failed installs.
661
662 ### save
663
664 * Default: false
665 * Type: Boolean
666
667 Save installed packages to a package.json file as dependencies.
668
669 When used with the `npm rm` command, it removes it from the `dependencies`
670 object.
671
672 Only works if there is already a package.json file present.
673
674 ### save-bundle
675
676 * Default: false
677 * Type: Boolean
678
679 If a package would be saved at install time by the use of `--save`,
680 `--save-dev`, or `--save-optional`, then also put it in the
681 `bundleDependencies` list.
682
683 When used with the `npm rm` command, it removes it from the
684 bundledDependencies list.
685
686 ### save-dev
687
688 * Default: false
689 * Type: Boolean
690
691 Save installed packages to a package.json file as `devDependencies`.
692
693 When used with the `npm rm` command, it removes it from the
694 `devDependencies` object.
695
696 Only works if there is already a package.json file present.
697
698 ### save-exact
699
700 * Default: false
701 * Type: Boolean
702
703 Dependencies saved to package.json using `--save`, `--save-dev` or
704 `--save-optional` will be configured with an exact version rather than
705 using npm's default semver range operator.
706
707 ### save-optional
708
709 * Default: false
710 * Type: Boolean
711
712 Save installed packages to a package.json file as
713 optionalDependencies.
714
715 When used with the `npm rm` command, it removes it from the
716 `devDependencies` object.
717
718 Only works if there is already a package.json file present.
719
720 ### save-prefix
721
722 * Default: '^'
723 * Type: String
724
725 Configure how versions of packages installed to a package.json file via
726 `--save` or `--save-dev` get prefixed.
727
728 For example if a package has version `1.2.3`, by default its version is
729 set to `^1.2.3` which allows minor upgrades for that package, but after
730 `npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows
731 patch upgrades.
732
733 ### scope
734
735 * Default: ""
736 * Type: String
737
738 Associate an operation with a scope for a scoped registry. Useful when logging
739 in to a private registry for the first time:
740 `npm login --scope=@organization --registry=registry.organization.com`, which
741 will cause `@organization` to be mapped to the registry for future installation
742 of packages specified according to the pattern `@organization/package`.
743
744 ### searchopts
745
746 * Default: ""
747 * Type: String
748
749 Space-separated options that are always passed to search.
750
751 ### searchexclude
752
753 * Default: ""
754 * Type: String
755
756 Space-separated options that limit the results from search.
757
758 ### searchsort
759
760 * Default: "name"
761 * Type: String
762 * Values: "name", "-name", "date", "-date", "description",
763   "-description", "keywords", "-keywords"
764
765 Indication of which field to sort search results by.  Prefix with a `-`
766 character to indicate reverse sort.
767
768 ### shell
769
770 * Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
771   Windows
772 * Type: path
773
774 The shell to run for the `npm explore` command.
775
776 ### shrinkwrap
777
778 * Default: true
779 * Type: Boolean
780
781 If set to false, then ignore `npm-shrinkwrap.json` files when
782 installing.
783
784 ### sign-git-tag
785
786 * Default: false
787 * Type: Boolean
788
789 If set to true, then the `npm version` command will tag the version
790 using `-s` to add a signature.
791
792 Note that git requires you to have set up GPG keys in your git configs
793 for this to work properly.
794
795 ### spin
796
797 * Default: true
798 * Type: Boolean or `"always"`
799
800 When set to `true`, npm will display an ascii spinner while it is doing
801 things, if `process.stderr` is a TTY.
802
803 Set to `false` to suppress the spinner, or set to `always` to output
804 the spinner even for non-TTY outputs.
805
806 ### strict-ssl
807
808 * Default: true
809 * Type: Boolean
810
811 Whether or not to do SSL key validation when making requests to the
812 registry via https.
813
814 See also the `ca` config.
815
816 ### tag
817
818 * Default: latest
819 * Type: String
820
821 If you ask npm to install a package and don't tell it a specific version, then
822 it will install the specified tag.
823
824 Also the tag that is added to the package@version specified by the `npm
825 tag` command, if no explicit tag is given.
826
827 ### tag-version-prefix
828
829 * Default: `"v"`
830 * Type: String
831
832 If set, alters the prefix used when tagging a new version when performing a
833 version increment using  `npm-version`. To remove the prefix altogether, set it
834 to the empty string: `""`.
835
836 Because other tools may rely on the convention that npm version tags look like
837 `v1.0.0`, _only use this property if it is absolutely necessary_. In
838 particular, use care when overriding this setting for public packages.
839
840 ### tmp
841
842 * Default: TMPDIR environment variable, or "/tmp"
843 * Type: path
844
845 Where to store temporary files and folders.  All temp files are deleted
846 on success, but left behind on failure for forensic purposes.
847
848 ### unicode
849
850 * Default: true
851 * Type: Boolean
852
853 When set to true, npm uses unicode characters in the tree output.  When
854 false, it uses ascii characters to draw trees.
855
856 ### unsafe-perm
857
858 * Default: false if running as root, true otherwise
859 * Type: Boolean
860
861 Set to true to suppress the UID/GID switching when running package
862 scripts.  If set explicitly to false, then installing as a non-root user
863 will fail.
864
865 ### usage
866
867 * Default: false
868 * Type: Boolean
869
870 Set to show short usage output (like the -H output)
871 instead of complete help when doing `npm-help(1)`.
872
873 ### user
874
875 * Default: "nobody"
876 * Type: String or Number
877
878 The UID to set to when running package scripts as root.
879
880 ### userconfig
881
882 * Default: ~/.npmrc
883 * Type: path
884
885 The location of user-level configuration settings.
886
887 ### umask
888
889 * Default: 022
890 * Type: Octal numeric string in range 0000..0777 (0..511)
891
892 The "umask" value to use when setting the file creation mode on files
893 and folders.
894
895 Folders and executables are given a mode which is `0777` masked against
896 this value.  Other files are given a mode which is `0666` masked against
897 this value.  Thus, the defaults are `0755` and `0644` respectively.
898
899 ### user-agent
900
901 * Default: node/{process.version} {process.platform} {process.arch}
902 * Type: String
903
904 Sets a User-Agent to the request header
905
906 ### version
907
908 * Default: false
909 * Type: boolean
910
911 If true, output the npm version and exit successfully.
912
913 Only relevant when specified explicitly on the command line.
914
915 ### versions
916
917 * Default: false
918 * Type: boolean
919
920 If true, output the npm version as well as node's `process.versions` map, and
921 exit successfully.
922
923 Only relevant when specified explicitly on the command line.
924
925 ### viewer
926
927 * Default: "man" on Posix, "browser" on Windows
928 * Type: path
929
930 The program to use to view help content.
931
932 Set to `"browser"` to view html help content in the default web browser.
933
934 ## SEE ALSO
935
936 * npm-config(1)
937 * npmrc(5)
938 * npm-scripts(7)
939 * npm-folders(5)
940 * npm(1)