29a6865099625a41b31fd5e936c7dd7b8f94a3f7
[platform/upstream/nodejs.git] / deps / npm / html / doc / cli / npm-config.html
1 <!doctype html>
2 <html>
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">
6
7   <body>
8     <div id="wrapper">
9 <h1><a href="../cli/npm-config.html">npm-config</a></h1> <p>Manage the npm configuration files</p>
10
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
12
13 <pre><code>npm config set &lt;key&gt; &lt;value&gt; [--global]
14 npm config get &lt;key&gt;
15 npm config delete &lt;key&gt;
16 npm config list
17 npm config edit
18 npm c [set|get|delete|list]
19 npm get &lt;key&gt;
20 npm set &lt;key&gt; &lt;value&gt; [--global]</code></pre>
21
22 <h2 id="DESCRIPTION">DESCRIPTION</h2>
23
24 <p>npm gets its config settings from the command line, environment
25 variables, <code>npmrc</code> files, and in some cases, the <code>package.json</code> file.</p>
26
27 <p>See <a href="../files/npmrc.html">npmrc(5)</a> for more information about the npmrc files.</p>
28
29 <p>See <code><a href="../misc/npm-config.html">npm-config(7)</a></code> for a more thorough discussion of the mechanisms
30 involved.</p>
31
32 <p>The <code>npm config</code> command can be used to update and edit the contents
33 of the user and global npmrc files.</p>
34
35 <h2 id="Sub-commands">Sub-commands</h2>
36
37 <p>Config supports the following sub-commands:</p>
38
39 <h3 id="set">set</h3>
40
41 <pre><code>npm config set key value</code></pre>
42
43 <p>Sets the config key to the value.</p>
44
45 <p>If value is omitted, then it sets it to &quot;true&quot;.</p>
46
47 <h3 id="get">get</h3>
48
49 <pre><code>npm config get key</code></pre>
50
51 <p>Echo the config value to stdout.</p>
52
53 <h3 id="list">list</h3>
54
55 <pre><code>npm config list</code></pre>
56
57 <p>Show all the config settings.</p>
58
59 <h3 id="delete">delete</h3>
60
61 <pre><code>npm config delete key</code></pre>
62
63 <p>Deletes the key from all configuration files.</p>
64
65 <h3 id="edit">edit</h3>
66
67 <pre><code>npm config edit</code></pre>
68
69 <p>Opens the config file in an editor.  Use the <code>--global</code> flag to edit the
70 global config.</p>
71
72 <h2 id="SEE-ALSO">SEE ALSO</h2>
73
74 <ul><li><a href="../files/npm-folders.html">npm-folders(5)</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="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
75 </div>
76 <p id="footer">npm-config &mdash; npm@1.3.17</p>
77 <script>
78 ;(function () {
79 var wrapper = document.getElementById("wrapper")
80 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
81   .filter(function (el) {
82     return el.parentNode === wrapper
83         && el.tagName.match(/H[1-6]/)
84         && el.id
85   })
86 var l = 2
87   , toc = document.createElement("ul")
88 toc.innerHTML = els.map(function (el) {
89   var i = el.tagName.charAt(1)
90     , out = ""
91   while (i > l) {
92     out += "<ul>"
93     l ++
94   }
95   while (i < l) {
96     out += "</ul>"
97     l --
98   }
99   out += "<li><a href='#" + el.id + "'>" +
100     ( el.innerText || el.text || el.innerHTML)
101     + "</a>"
102   return out
103 }).join("\n")
104 toc.id = "toc"
105 document.body.appendChild(toc)
106 })()
107 </script>