3 <title>npm-config</title>
4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../../static/style.css">
9 <h1><a href="../misc/npm-config.html">npm-config</a></h1> <p>More than you probably want to know about npm configuration</p>
11 <h2 id="DESCRIPTION">DESCRIPTION</h2>
13 <p>npm gets its configuration values from 6 sources, in this priority:</p>
15 <h3 id="Command-Line-Flags">Command Line Flags</h3>
17 <p>Putting <code>--foo bar</code> on the command line sets the <code>foo</code> configuration
18 parameter to <code>"bar"</code>. A <code>--</code> argument tells the cli parser to stop
19 reading flags. A <code>--flag</code> parameter that is at the <em>end</em> of the
20 command will be given the value of <code>true</code>.</p>
22 <h3 id="Environment-Variables">Environment Variables</h3>
24 <p>Any environment variables that start with <code>npm_config_</code> will be
25 interpreted as a configuration parameter. For example, putting
26 <code>npm_config_foo=bar</code> in your environment will set the <code>foo</code>
27 configuration parameter to <code>bar</code>. Any environment configurations that
28 are not given a value will be given the value of <code>true</code>. Config
29 values are case-insensitive, so <code>NPM_CONFIG_FOO=bar</code> will work the
32 <h3 id="npmrc-Files">npmrc Files</h3>
34 <p>The three relevant files are:</p>
36 <ul><li>per-user config file (~/.npmrc)</li><li>global config file ($PREFIX/npmrc)</li><li>npm builtin config file (/path/to/npm/npmrc)</li></ul>
38 <p>See <a href="../files/npmrc.html">npmrc(5)</a> for more details.</p>
40 <h3 id="Default-Configs">Default Configs</h3>
42 <p>A set of configuration parameters that are internal to npm, and are
43 defaults if nothing else is specified.</p>
45 <h2 id="Shorthands-and-Other-CLI-Niceties">Shorthands and Other CLI Niceties</h2>
47 <p>The following shorthands are parsed on the command-line:</p>
49 <ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-D</code>: <code>--save-dev</code></li><li><code>-O</code>: <code>--save-optional</code></li><li><code>-B</code>: <code>--save-bundle</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
51 <p>If the specified configuration param resolves unambiguously to a known
52 configuration parameter, then it is expanded to that configuration
53 parameter. For example:</p>
55 <pre><code>npm ls --par
57 npm ls --parseable</code></pre>
59 <p>If multiple single-character shorthands are strung together, and the
60 resulting combination is unambiguously not some other configuration
61 param, then it is expanded to its various component pieces. For
64 <pre><code>npm ls -gpld
66 npm ls --global --parseable --long --loglevel info</code></pre>
68 <h2 id="Per-Package-Config-Settings">Per-Package Config Settings</h2>
70 <p>When running scripts (see <code><a href="../misc/npm-scripts.html">npm-scripts(7)</a></code>) the package.json "config"
71 keys are overwritten in the environment if there is a config param of
72 <code><name>[@<version>]:<key></code>. For example, if the package.json has
75 <pre><code>{ "name" : "foo"
76 , "config" : { "port" : "8080" }
77 , "scripts" : { "start" : "node server.js" } }</code></pre>
79 <p>and the server.js is this:</p>
81 <pre><code>http.createServer(...).listen(process.env.npm_package_config_port)</code></pre>
83 <p>then the user could change the behavior by doing:</p>
85 <pre><code>npm config set foo:port 80</code></pre>
87 <p>See <a href="../files/package.json.html">package.json(5)</a> for more information.</p>
89 <h2 id="Config-Settings">Config Settings</h2>
91 <h3 id="always-auth">always-auth</h3>
93 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
95 <p>Force npm to always require authentication when accessing the registry,
96 even for <code>GET</code> requests.</p>
98 <h3 id="bin-links">bin-links</h3>
100 <ul><li>Default: <code>true</code></li><li>Type: Boolean</li></ul>
102 <p>Tells npm to create symlinks (or <code>.cmd</code> shims on Windows) for package
105 <p>Set to false to have it not do this. This can be used to work around
106 the fact that some file systems don't support symlinks, even on
107 ostensibly Unix systems.</p>
109 <h3 id="browser">browser</h3>
111 <ul><li>Default: OS X: <code>"open"</code>, Windows: <code>"start"</code>, Others: <code>"xdg-open"</code></li><li>Type: String</li></ul>
113 <p>The browser that is called by the <code>npm docs</code> command to open websites.</p>
117 <ul><li>Default: The npm CA certificate</li><li>Type: String or null</li></ul>
119 <p>The Certificate Authority signing certificate that is trusted for SSL
120 connections to the registry.</p>
122 <p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert
123 to trust only that specific signing authority.</p>
125 <p>See also the <code>strict-ssl</code> config.</p>
127 <h3 id="cache">cache</h3>
129 <ul><li>Default: Windows: <code>%AppData%\npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul>
131 <p>The location of npm's cache directory. See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code></p>
133 <h3 id="cache-lock-stale">cache-lock-stale</h3>
135 <ul><li>Default: 60000 (1 minute)</li><li>Type: Number</li></ul>
137 <p>The number of ms before cache folder lockfiles are considered stale.</p>
139 <h3 id="cache-lock-retries">cache-lock-retries</h3>
141 <ul><li>Default: 10</li><li>Type: Number</li></ul>
143 <p>Number of times to retry to acquire a lock on cache folder lockfiles.</p>
145 <h3 id="cache-lock-wait">cache-lock-wait</h3>
147 <ul><li>Default: 10000 (10 seconds)</li><li>Type: Number</li></ul>
149 <p>Number of ms to wait for cache lock files to expire.</p>
151 <h3 id="cache-max">cache-max</h3>
153 <ul><li>Default: Infinity</li><li>Type: Number</li></ul>
155 <p>The maximum time (in seconds) to keep items in the registry cache before
156 re-checking against the registry.</p>
158 <p>Note that no purging is done unless the <code>npm cache clean</code> command is
159 explicitly used, and that only GET requests use the cache.</p>
161 <h3 id="cache-min">cache-min</h3>
163 <ul><li>Default: 10</li><li>Type: Number</li></ul>
165 <p>The minimum time (in seconds) to keep items in the registry cache before
166 re-checking against the registry.</p>
168 <p>Note that no purging is done unless the <code>npm cache clean</code> command is
169 explicitly used, and that only GET requests use the cache.</p>
171 <h3 id="color">color</h3>
173 <ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>"always"</code></li></ul>
175 <p>If false, never shows colors. If <code>"always"</code> then always shows colors.
176 If true, then only prints color codes for tty file descriptors.</p>
178 <h3 id="coverage">coverage</h3>
180 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
182 <p>A flag to tell test-harness to run with their coverage options enabled,
183 if they respond to the <code>npm_config_coverage</code> environment variable.</p>
185 <h3 id="depth">depth</h3>
187 <ul><li>Default: Infinity</li><li>Type: Number</li></ul>
189 <p>The depth to go when recursing directories for <code>npm ls</code> and
190 <code>npm cache ls</code>.</p>
192 <h3 id="description">description</h3>
194 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
196 <p>Show the description in <code>npm search</code></p>
198 <h3 id="dev">dev</h3>
200 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
202 <p>Install <code>dev-dependencies</code> along with packages.</p>
204 <p>Note that <code>dev-dependencies</code> are also installed if the <code>npat</code> flag is
207 <h3 id="editor">editor</h3>
209 <ul><li>Default: <code>EDITOR</code> environment variable if set, or <code>"vi"</code> on Posix,
210 or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul>
212 <p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p>
214 <h3 id="engine-strict">engine-strict</h3>
216 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
218 <p>If set to true, then npm will stubbornly refuse to install (or even
219 consider installing) any package that claims to not be compatible with
220 the current Node.js version.</p>
222 <h3 id="force">force</h3>
224 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
226 <p>Makes various commands more forceful.</p>
228 <ul><li>lifecycle script failure does not block progress.</li><li>publishing clobbers previously published versions.</li><li>skips cache when requesting from the registry.</li><li>prevents checks against clobbering non-npm files.</li></ul>
230 <h3 id="fetch-retries">fetch-retries</h3>
232 <ul><li>Default: 2</li><li>Type: Number</li></ul>
234 <p>The "retries" config for the <code>retry</code> module to use when fetching
235 packages from the registry.</p>
237 <h3 id="fetch-retry-factor">fetch-retry-factor</h3>
239 <ul><li>Default: 10</li><li>Type: Number</li></ul>
241 <p>The "factor" config for the <code>retry</code> module to use when fetching
244 <h3 id="fetch-retry-mintimeout">fetch-retry-mintimeout</h3>
246 <ul><li>Default: 10000 (10 seconds)</li><li>Type: Number</li></ul>
248 <p>The "minTimeout" config for the <code>retry</code> module to use when fetching
251 <h3 id="fetch-retry-maxtimeout">fetch-retry-maxtimeout</h3>
253 <ul><li>Default: 60000 (1 minute)</li><li>Type: Number</li></ul>
255 <p>The "maxTimeout" config for the <code>retry</code> module to use when fetching
258 <h3 id="git">git</h3>
260 <ul><li>Default: <code>"git"</code></li><li>Type: String</li></ul>
262 <p>The command to use for git commands. If git is installed on the
263 computer, but is not in the <code>PATH</code>, then set this to the full path to
266 <h3 id="global">global</h3>
268 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
270 <p>Operates in "global" mode, so that packages are installed into the
271 <code>prefix</code> folder instead of the current working directory. See
272 <code><a href="../files/npm-folders.html">npm-folders(5)</a></code> for more on the differences in behavior.</p>
274 <ul><li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead of the
275 current working directory.</li><li>bin files are linked to <code>{prefix}/bin</code></li><li>man pages are linked to <code>{prefix}/share/man</code></li></ul>
277 <h3 id="globalconfig">globalconfig</h3>
279 <ul><li>Default: {prefix}/etc/npmrc</li><li>Type: path</li></ul>
281 <p>The config file to read for global config options.</p>
283 <h3 id="globalignorefile">globalignorefile</h3>
285 <ul><li>Default: {prefix}/etc/npmignore</li><li>Type: path</li></ul>
287 <p>The config file to read for global ignore patterns to apply to all users
288 and all projects.</p>
290 <p>If not found, but there is a "gitignore" file in the
291 same directory, then that will be used instead.</p>
293 <h3 id="group">group</h3>
295 <ul><li>Default: GID of the current process</li><li>Type: String or Number</li></ul>
297 <p>The group to use when running package scripts in global mode as the root
300 <h3 id="https-proxy">https-proxy</h3>
302 <ul><li>Default: the <code>HTTPS_PROXY</code> or <code>https_proxy</code> or <code>HTTP_PROXY</code> or
303 <code>http_proxy</code> environment variables.</li><li>Type: url</li></ul>
305 <p>A proxy to use for outgoing https requests.</p>
307 <h3 id="user-agent">user-agent</h3>
309 <ul><li>Default: node/{process.version} {process.platform} {process.arch}</li><li>Type: String</li></ul>
311 <p>Sets a User-Agent to the request header</p>
313 <h3 id="ignore">ignore</h3>
315 <ul><li>Default: ""</li><li>Type: string</li></ul>
317 <p>A white-space separated list of glob patterns of files to always exclude
318 from packages when building tarballs.</p>
320 <h3 id="init-module">init-module</h3>
322 <ul><li>Default: ~/.npm-init.js</li><li>Type: path</li></ul>
324 <p>A module that will be loaded by the <code>npm init</code> command. See the
325 documentation for the
326 <a href="https://github.com/isaacs/init-package-json">init-package-json</a> module
327 for more information, or <a href="../cli/npm-init.html">npm-init(1)</a>.</p>
329 <h3 id="init-version">init.version</h3>
331 <ul><li>Default: "0.0.0"</li><li>Type: semver</li></ul>
333 <p>The value <code>npm init</code> should use by default for the package version.</p>
335 <h3 id="init-author-name">init.author.name</h3>
337 <ul><li>Default: ""</li><li>Type: String</li></ul>
339 <p>The value <code>npm init</code> should use by default for the package author's name.</p>
341 <h3 id="init-author-email">init.author.email</h3>
343 <ul><li>Default: ""</li><li>Type: String</li></ul>
345 <p>The value <code>npm init</code> should use by default for the package author's email.</p>
347 <h3 id="init-author-url">init.author.url</h3>
349 <ul><li>Default: ""</li><li>Type: String</li></ul>
351 <p>The value <code>npm init</code> should use by default for the package author's homepage.</p>
353 <h3 id="json">json</h3>
355 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
357 <p>Whether or not to output JSON data, rather than the normal output.</p>
359 <p>This feature is currently experimental, and the output data structures
360 for many commands is either not implemented in JSON yet, or subject to
361 change. Only the output from <code>npm ls --json</code> is currently valid.</p>
363 <h3 id="link">link</h3>
365 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
367 <p>If true, then local installs will link if there is a suitable globally
368 installed package.</p>
370 <p>Note that this means that local installs can cause things to be
371 installed into the global space at the same time. The link is only done
372 if one of the two conditions are met:</p>
374 <ul><li>The package is not already installed globally, or</li><li>the globally installed version is identical to the version that is
375 being installed locally.</li></ul>
377 <h3 id="loglevel">loglevel</h3>
379 <ul><li>Default: "http"</li><li>Type: String</li><li>Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"</li></ul>
381 <p>What level of logs to report. On failure, <em>all</em> logs are written to
382 <code>npm-debug.log</code> in the current working directory.</p>
384 <p>Any logs of a higher level than the setting are shown.
385 The default is "http", which shows http, warn, and error output.</p>
387 <h3 id="logstream">logstream</h3>
389 <ul><li>Default: process.stderr</li><li>Type: Stream</li></ul>
391 <p>This is the stream that is passed to the
392 <a href="https://github.com/isaacs/npmlog">npmlog</a> module at run time.</p>
394 <p>It cannot be set from the command line, but if you are using npm
395 programmatically, you may wish to send logs to somewhere other than
398 <p>If the <code>color</code> config is set to true, then this stream will receive
399 colored output if it is a TTY.</p>
401 <h3 id="long">long</h3>
403 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
405 <p>Show extended information in <code>npm ls</code></p>
407 <h3 id="message">message</h3>
409 <ul><li>Default: "%s"</li><li>Type: String</li></ul>
411 <p>Commit message which is used by <code>npm version</code> when creating version commit.</p>
413 <p>Any "%s" in the message will be replaced with the version number.</p>
415 <h3 id="node-version">node-version</h3>
417 <ul><li>Default: process.version</li><li>Type: semver or false</li></ul>
419 <p>The node version to use when checking package's "engines" hash.</p>
421 <h3 id="npat">npat</h3>
423 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
425 <p>Run tests on installation and report results to the
426 <code>npaturl</code>.</p>
428 <h3 id="npaturl">npaturl</h3>
430 <ul><li>Default: Not yet implemented</li><li>Type: url</li></ul>
432 <p>The url to report npat test results.</p>
434 <h3 id="onload-script">onload-script</h3>
436 <ul><li>Default: false</li><li>Type: path</li></ul>
438 <p>A node module to <code>require()</code> when npm loads. Useful for programmatic
441 <h3 id="optional">optional</h3>
443 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
445 <p>Attempt to install packages in the <code>optionalDependencies</code> hash. Note
446 that if these packages fail to install, the overall installation
447 process is not aborted.</p>
449 <h3 id="parseable">parseable</h3>
451 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
453 <p>Output parseable results from commands that write to
456 <h3 id="prefix">prefix</h3>
458 <ul><li>Default: see <a href="../files/npm-folders.html">npm-folders(5)</a></li><li>Type: path</li></ul>
460 <p>The location to install global items. If set on the command line, then
461 it forces non-global commands to run in the specified folder.</p>
463 <h3 id="production">production</h3>
465 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
467 <p>Set to true to run in "production" mode.</p>
469 <ol><li>devDependencies are not installed at the topmost level when running
470 local <code>npm install</code> without any arguments.</li><li>Set the NODE_ENV="production" for lifecycle scripts.</li></ol>
472 <h3 id="proprietary-attribs">proprietary-attribs</h3>
474 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
476 <p>Whether or not to include proprietary extended attributes in the
477 tarballs created by npm.</p>
479 <p>Unless you are expecting to unpack package tarballs with something other
480 than npm -- particularly a very outdated tar implementation -- leave
483 <h3 id="proxy">proxy</h3>
485 <ul><li>Default: <code>HTTP_PROXY</code> or <code>http_proxy</code> environment variable, or null</li><li>Type: url</li></ul>
487 <p>A proxy to use for outgoing http requests.</p>
489 <h3 id="rebuild-bundle">rebuild-bundle</h3>
491 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
493 <p>Rebuild bundled dependencies after installation.</p>
495 <h3 id="registry">registry</h3>
497 <ul><li>Default: https://registry.npmjs.org/</li><li>Type: url</li></ul>
499 <p>The base URL of the npm package registry.</p>
501 <h3 id="rollback">rollback</h3>
503 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
505 <p>Remove failed installs.</p>
507 <h3 id="save">save</h3>
509 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
511 <p>Save installed packages to a package.json file as dependencies.</p>
513 <p>When used with the <code>npm rm</code> command, it removes it from the dependencies
516 <p>Only works if there is already a package.json file present.</p>
518 <h3 id="save-bundle">save-bundle</h3>
520 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
522 <p>If a package would be saved at install time by the use of <code>--save</code>,
523 <code>--save-dev</code>, or <code>--save-optional</code>, then also put it in the
524 <code>bundleDependencies</code> list.</p>
526 <p>When used with the <code>npm rm</code> command, it removes it from the
527 bundledDependencies list.</p>
529 <h3 id="save-dev">save-dev</h3>
531 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
533 <p>Save installed packages to a package.json file as devDependencies.</p>
535 <p>When used with the <code>npm rm</code> command, it removes it from the devDependencies
538 <p>Only works if there is already a package.json file present.</p>
540 <h3 id="save-optional">save-optional</h3>
542 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
544 <p>Save installed packages to a package.json file as optionalDependencies.</p>
546 <p>When used with the <code>npm rm</code> command, it removes it from the devDependencies
549 <p>Only works if there is already a package.json file present.</p>
551 <h3 id="searchopts">searchopts</h3>
553 <ul><li>Default: ""</li><li>Type: String</li></ul>
555 <p>Space-separated options that are always passed to search.</p>
557 <h3 id="searchexclude">searchexclude</h3>
559 <ul><li>Default: ""</li><li>Type: String</li></ul>
561 <p>Space-separated options that limit the results from search.</p>
563 <h3 id="searchsort">searchsort</h3>
565 <ul><li>Default: "name"</li><li>Type: String</li><li>Values: "name", "-name", "date", "-date", "description",
566 "-description", "keywords", "-keywords"</li></ul>
568 <p>Indication of which field to sort search results by. Prefix with a <code>-</code>
569 character to indicate reverse sort.</p>
571 <h3 id="shell">shell</h3>
573 <ul><li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
574 Windows</li><li>Type: path</li></ul>
576 <p>The shell to run for the <code>npm explore</code> command.</p>
578 <h3 id="shrinkwrap">shrinkwrap</h3>
580 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
582 <p>If set to false, then ignore <code>npm-shrinkwrap.json</code> files when
585 <h3 id="sign-git-tag">sign-git-tag</h3>
587 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
589 <p>If set to true, then the <code>npm version</code> command will tag the version
590 using <code>-s</code> to add a signature.</p>
592 <p>Note that git requires you to have set up GPG keys in your git configs
593 for this to work properly.</p>
595 <h3 id="strict-ssl">strict-ssl</h3>
597 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
599 <p>Whether or not to do SSL key validation when making requests to the
600 registry via https.</p>
602 <p>See also the <code>ca</code> config.</p>
604 <h3 id="tag">tag</h3>
606 <ul><li>Default: latest</li><li>Type: String</li></ul>
608 <p>If you ask npm to install a package and don't tell it a specific version, then
609 it will install the specified tag.</p>
611 <p>Also the tag that is added to the package@version specified by the <code>npm
612 tag</code> command, if no explicit tag is given.</p>
614 <h3 id="tmp">tmp</h3>
616 <ul><li>Default: TMPDIR environment variable, or "/tmp"</li><li>Type: path</li></ul>
618 <p>Where to store temporary files and folders. All temp files are deleted
619 on success, but left behind on failure for forensic purposes.</p>
621 <h3 id="unicode">unicode</h3>
623 <ul><li>Default: true</li><li>Type: Boolean</li></ul>
625 <p>When set to true, npm uses unicode characters in the tree output. When
626 false, it uses ascii characters to draw trees.</p>
628 <h3 id="unsafe-perm">unsafe-perm</h3>
630 <ul><li>Default: false if running as root, true otherwise</li><li>Type: Boolean</li></ul>
632 <p>Set to true to suppress the UID/GID switching when running package
633 scripts. If set explicitly to false, then installing as a non-root user
636 <h3 id="usage">usage</h3>
638 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
640 <p>Set to show short usage output (like the -H output)
641 instead of complete help when doing <code><a href="../cli/npm-help.html">npm-help(1)</a></code>.</p>
643 <h3 id="user">user</h3>
645 <ul><li>Default: "nobody"</li><li>Type: String or Number</li></ul>
647 <p>The UID to set to when running package scripts as root.</p>
649 <h3 id="username">username</h3>
651 <ul><li>Default: null</li><li>Type: String</li></ul>
653 <p>The username on the npm registry. Set with <code>npm adduser</code></p>
655 <h3 id="userconfig">userconfig</h3>
657 <ul><li>Default: ~/.npmrc</li><li>Type: path</li></ul>
659 <p>The location of user-level configuration settings.</p>
661 <h3 id="userignorefile">userignorefile</h3>
663 <ul><li>Default: ~/.npmignore</li><li>Type: path</li></ul>
665 <p>The location of a user-level ignore file to apply to all packages.</p>
667 <p>If not found, but there is a .gitignore file in the same directory, then
668 that will be used instead.</p>
670 <h3 id="umask">umask</h3>
672 <ul><li>Default: 022</li><li>Type: Octal numeric string</li></ul>
674 <p>The "umask" value to use when setting the file creation mode on files
677 <p>Folders and executables are given a mode which is <code>0777</code> masked against
678 this value. Other files are given a mode which is <code>0666</code> masked against
679 this value. Thus, the defaults are <code>0755</code> and <code>0644</code> respectively.</p>
681 <h3 id="version">version</h3>
683 <ul><li>Default: false</li><li>Type: boolean</li></ul>
685 <p>If true, output the npm version and exit successfully.</p>
687 <p>Only relevant when specified explicitly on the command line.</p>
689 <h3 id="versions">versions</h3>
691 <ul><li>Default: false</li><li>Type: boolean</li></ul>
693 <p>If true, output the npm version as well as node's <code>process.versions</code>
694 hash, and exit successfully.</p>
696 <p>Only relevant when specified explicitly on the command line.</p>
698 <h3 id="viewer">viewer</h3>
700 <ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul>
702 <p>The program to use to view help content.</p>
704 <p>Set to <code>"browser"</code> to view html help content in the default web browser.</p>
706 <h3 id="yes">yes</h3>
708 <ul><li>Default: null</li><li>Type: Boolean or null</li></ul>
710 <p>If set to <code>null</code>, then prompt the user for responses in some
713 <p>If set to <code>true</code>, then answer "yes" to any prompt. If set to <code>false</code>
714 then answer "no" to any prompt.</p>
716 <h2 id="SEE-ALSO">SEE ALSO</h2>
718 <ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
720 <p id="footer">npm-config — npm@1.3.15</p>
723 var wrapper = document.getElementById("wrapper")
724 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
725 .filter(function (el) {
726 return el.parentNode === wrapper
727 && el.tagName.match(/H[1-6]/)
731 , toc = document.createElement("ul")
732 toc.innerHTML = els.map(function (el) {
733 var i = el.tagName.charAt(1)
743 out += "<li><a href='#" + el.id + "'>" +
744 ( el.innerText || el.text || el.innerHTML)
749 document.body.appendChild(toc)