The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.
Please select the desired protocol below to get the URL.
This URL has Read-Only access.
main_repo / deps / npm / html / api / config.html @ 54a4c639
History | View | Annotate | Download (2.43 KB)
1 |
<!doctype html>
|
---|---|
2 |
<html>
|
3 |
<title>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="../api/config.html">config</a></h1> <p>Manage the npm configuration files</p> |
10 |
|
11 |
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
12 |
|
13 |
<pre><code>npm.commands.config(args, callback) |
14 |
var val = npm.config.get(key) |
15 |
npm.config.set(key, val)</code></pre> |
16 |
|
17 |
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
18 |
|
19 |
<p>This function acts much the same way as the command-line version. The first
|
20 |
element in the array tells config what to do. Possible values are:</p>
|
21 |
|
22 |
<ul><li><p><code>set</code></p><p>Sets a config parameter. The second element in <code>args</code> is interpreted as the |
23 |
key, and the third element is interpreted as the value.</p></li><li><p><code>get</code></p><p>Gets the value of a config parameter. The second element in <code>args</code> is the |
24 |
key to get the value of.</p></li><li><p><code>delete</code> (<code>rm</code> or <code>del</code>)</p><p>Deletes a parameter from the config. The second element in <code>args</code> is the |
25 |
key to delete.</p></li><li><p><code>list</code> (<code>ls</code>)</p><p>Show all configs that aren't secret. No parameters necessary.</p></li><li><p><code>edit</code>:</p><p>Opens the config file in the default editor. This command isn't very useful |
26 |
programmatically, but it is made available.</p></li></ul> |
27 |
|
28 |
<p>To programmatically access npm configuration settings, or set them for
|
29 |
the duration of a program, use the <code>npm.config.set</code> and <code>npm.config.get</code> |
30 |
functions instead.</p>
|
31 |
|
32 |
<h2 id="SEE-ALSO">SEE ALSO</h2> |
33 |
|
34 |
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul> |
35 |
</div>
|
36 |
<p id="footer">config — npm@1.1.61</p> |
37 |
<script>
|
38 |
;(function () {
|
39 |
var wrapper = document.getElementById("wrapper")
|
40 |
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
|
41 |
.filter(function (el) {
|
42 |
return el.parentNode === wrapper
|
43 |
&& el.tagName.match(/H[1-6]/)
|
44 |
&& el.id
|
45 |
})
|
46 |
var l = 2
|
47 |
, toc = document.createElement("ul")
|
48 |
toc.innerHTML = els.map(function (el) {
|
49 |
var i = el.tagName.charAt(1)
|
50 |
, out = ""
|
51 |
while (i > l) {
|
52 |
out += "<ul>"
|
53 |
l ++
|
54 |
}
|
55 |
while (i < l) {
|
56 |
out += "</ul>"
|
57 |
l --
|
58 |
}
|
59 |
out += "<li><a href='#" + el.id + "'>" +
|
60 |
( el.innerText || el.text || el.innerHTML)
|
61 |
+ "</a>"
|
62 |
return out
|
63 |
}).join("\n")
|
64 |
toc.id = "toc"
|
65 |
document.body.appendChild(toc)
|
66 |
})()
|
67 |
</script>
|
68 |
</body></html> |