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="../files/npmrc.html">npmrc</a></h1> <p>The npm config files</p>
11 <h2 id="DESCRIPTION">DESCRIPTION</h2>
13 <p>npm gets its config settings from the command line, environment
14 variables, and <code>npmrc</code> files.</p>
16 <p>The <code>npm config</code> command can be used to update and edit the contents
17 of the user and global npmrc files.</p>
19 <p>For a list of available configuration options, see <a href="../misc/npm-config.html">npm-config(7)</a>.</p>
21 <h2 id="FILES">FILES</h2>
23 <p>The three relevant files are:</p>
25 <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>
27 <p>All npm config files are an ini-formatted list of <code>key = value</code>
28 parameters. Environment variables can be replaced using
29 <code>${VARIABLE_NAME}</code>. For example:</p>
31 <pre><code>prefix = ${HOME}/.npm-packages</code></pre>
33 <p>Each of these files is loaded, and config options are resolved in
34 priority order. For example, a setting in the userconfig file would
35 override the setting in the globalconfig file.</p>
37 <h3 id="Per-user-config-file">Per-user config file</h3>
39 <p><code>$HOME/.npmrc</code> (or the <code>userconfig</code> param, if set in the environment
40 or on the command line)</p>
42 <h3 id="Global-config-file">Global config file</h3>
44 <p><code>$PREFIX/etc/npmrc</code> (or the <code>globalconfig</code> param, if set above):
45 This file is an ini-file formatted list of <code>key = value</code> parameters.
46 Environment variables can be replaced as above.</p>
48 <h3 id="Built-in-config-file">Built-in config file</h3>
50 <p><code>path/to/npm/itself/npmrc</code></p>
52 <p>This is an unchangeable "builtin" configuration file that npm keeps
53 consistent across updates. Set fields in here using the <code>./configure</code>
54 script that comes with npm. This is primarily for distribution
55 maintainers to override default configs in a standard and consistent
58 <h2 id="SEE-ALSO">SEE ALSO</h2>
60 <ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><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/package.json.html">package.json(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
62 <p id="footer">npmrc — npm@1.3.17</p>
65 var wrapper = document.getElementById("wrapper")
66 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
67 .filter(function (el) {
68 return el.parentNode === wrapper
69 && el.tagName.match(/H[1-6]/)
73 , toc = document.createElement("ul")
74 toc.innerHTML = els.map(function (el) {
75 var i = el.tagName.charAt(1)
85 out += "<li><a href='#" + el.id + "'>" +
86 ( el.innerText || el.text || el.innerHTML)
91 document.body.appendChild(toc)