mirror of https://github.com/lukechilds/node.git
isaacs
13 years ago
238 changed files with 612 additions and 3231 deletions
Binary file not shown.
@ -1,69 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>author</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/owner.html">owner</a></h1> <p>Manage package owners</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.commands.owner(args, callback)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>The first element of the 'args' parameter defines what to do, and the subsequent |
|
||||
elements depend on the action. Possible values for the action are (order of |
|
||||
parameters are given in parenthesis):</p> |
|
||||
|
|
||||
<ul><li>ls (package): |
|
||||
List all the users who have access to modify a package and push new versions. |
|
||||
Handy when you need to know who to bug for help.</li><li>add (user, package): |
|
||||
Add a new user as a maintainer of a package. This user is enabled to modify |
|
||||
metadata, publish new versions, and add other owners.</li><li>rm (user, package): |
|
||||
Remove a user from the package owner list. This immediately revokes their |
|
||||
privileges.</li></ul> |
|
||||
|
|
||||
<p>Note that there is only one level of access. Either you can modify a package, |
|
||||
or you can't. Future versions may contain more fine-grained access levels, but |
|
||||
that is not implemented at this time.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">author — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,88 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>find</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/ls.html">ls</a></h1> <p>List installed packages</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.commands.ls(args, [silent,] callback)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This command will print to stdout all the versions of packages that are |
|
||||
installed, as well as their dependencies, in a tree-structure. It will also |
|
||||
return that data using the callback.</p> |
|
||||
|
|
||||
<p>This command does not take any arguments, but args must be defined. |
|
||||
Beyond that, if any arguments are passed in, npm will politely warn that it |
|
||||
does not take positional arguments, though you may set config flags |
|
||||
like with any other command, such as <code>global</code> to list global packages.</p> |
|
||||
|
|
||||
<p>It will print out extraneous, missing, and invalid packages.</p> |
|
||||
|
|
||||
<p>If the silent parameter is set to true, nothing will be output to the screen, |
|
||||
but the data will still be returned.</p> |
|
||||
|
|
||||
<h2 id="CONFIGURATION">CONFIGURATION</h2> |
|
||||
|
|
||||
<h3 id="long">long</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show extended information.</p> |
|
||||
|
|
||||
<h3 id="parseable">parseable</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show parseable output instead of tree view.</p> |
|
||||
|
|
||||
<h3 id="global">global</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>List packages in the global install prefix instead of in the current |
|
||||
project.</p> |
|
||||
|
|
||||
<p>Note, if parseable is set or long isn't set, then duplicates will be trimmed. |
|
||||
This means that if a submodule a same dependency as a parent module, then the |
|
||||
dependency will only be output once.</p> |
|
||||
</div> |
|
||||
<p id="footer">find — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,68 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>get</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/config.html">config</a></h1> <p>Manage the npm configuration files</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.commands.config(args, callback) |
|
||||
var val = npm.config.get(key) |
|
||||
npm.config.set(key, val)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This function acts much the same way as the command-line version. The first |
|
||||
element in the array tells config what to do. Possible values are:</p> |
|
||||
|
|
||||
<ul><li><p><code>set</code></p><p>Sets a config parameter. The second element in <code>args</code> is interpreted as the |
|
||||
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 |
|
||||
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 |
|
||||
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 |
|
||||
programmatically, but it is made available.</p></li></ul> |
|
||||
|
|
||||
<p>To programmatically access npm configuration settings, or set them for |
|
||||
the duration of a program, use the <code>npm.config.set</code> and <code>npm.config.get</code> |
|
||||
functions instead.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">get — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,60 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>home</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/docs.html">docs</a></h1> <p>Docs for a package in a web browser maybe</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.commands.docs(package, callback)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This command tries to guess at the likely location of a package's |
|
||||
documentation URL, and then tries to open it using the <code>--browser</code> |
|
||||
config param.</p> |
|
||||
|
|
||||
<p>Like other commands, the first parameter is an array. This command only |
|
||||
uses the first element, which is expected to be a package name with an |
|
||||
optional version number.</p> |
|
||||
|
|
||||
<p>This command will launch a browser, so this command may not be the most |
|
||||
friendly for programmatic use.</p> |
|
||||
</div> |
|
||||
<p id="footer">home — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,88 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>list</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/ls.html">ls</a></h1> <p>List installed packages</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.commands.ls(args, [silent,] callback)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This command will print to stdout all the versions of packages that are |
|
||||
installed, as well as their dependencies, in a tree-structure. It will also |
|
||||
return that data using the callback.</p> |
|
||||
|
|
||||
<p>This command does not take any arguments, but args must be defined. |
|
||||
Beyond that, if any arguments are passed in, npm will politely warn that it |
|
||||
does not take positional arguments, though you may set config flags |
|
||||
like with any other command, such as <code>global</code> to list global packages.</p> |
|
||||
|
|
||||
<p>It will print out extraneous, missing, and invalid packages.</p> |
|
||||
|
|
||||
<p>If the silent parameter is set to true, nothing will be output to the screen, |
|
||||
but the data will still be returned.</p> |
|
||||
|
|
||||
<h2 id="CONFIGURATION">CONFIGURATION</h2> |
|
||||
|
|
||||
<h3 id="long">long</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show extended information.</p> |
|
||||
|
|
||||
<h3 id="parseable">parseable</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show parseable output instead of tree view.</p> |
|
||||
|
|
||||
<h3 id="global">global</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>List packages in the global install prefix instead of in the current |
|
||||
project.</p> |
|
||||
|
|
||||
<p>Note, if parseable is set or long isn't set, then duplicates will be trimmed. |
|
||||
This means that if a submodule a same dependency as a parent module, then the |
|
||||
dependency will only be output once.</p> |
|
||||
</div> |
|
||||
<p id="footer">list — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,74 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>ln</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/link.html">link</a></h1> <p>Symlink a package folder</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.command.link(callback) |
|
||||
npm.command.link(packages, callback)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>Package linking is a two-step process.</p> |
|
||||
|
|
||||
<p>Without parameters, link will create a globally-installed |
|
||||
symbolic link from <code>prefix/package-name</code> to the current folder.</p> |
|
||||
|
|
||||
<p>With a parameters, link will create a symlink from the local <code>node_modules</code> |
|
||||
folder to the global symlink.</p> |
|
||||
|
|
||||
<p>When creating tarballs for <code>npm publish</code>, the linked packages are |
|
||||
"snapshotted" to their current state by resolving the symbolic links.</p> |
|
||||
|
|
||||
<p>This is |
|
||||
handy for installing your own stuff, so that you can work on it and test it |
|
||||
iteratively without having to continually rebuild.</p> |
|
||||
|
|
||||
<p>For example:</p> |
|
||||
|
|
||||
<pre><code>npm.commands.link(cb) # creates global link from the cwd |
|
||||
# (say redis package) |
|
||||
npm.commands.link('redis', cb) # link-install the package</code></pre> |
|
||||
|
|
||||
<p>Now, any changes to the redis package will be reflected in |
|
||||
the package in the current working directory</p> |
|
||||
</div> |
|
||||
<p id="footer">ln — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,57 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>rm</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/uninstall.html">uninstall</a></h1> <p>uninstall a package programmatically</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.commands.uninstall(packages, callback)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This acts much the same ways as uninstalling on the command-line.</p> |
|
||||
|
|
||||
<p>The 'packages' parameter is an array of strings. Each element in the array is |
|
||||
the name of a package to be uninstalled.</p> |
|
||||
|
|
||||
<p>Finally, 'callback' is a function that will be called when all packages have been |
|
||||
uninstalled or when an error has been encountered.</p> |
|
||||
</div> |
|
||||
<p id="footer">rm — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,68 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>set</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../api/config.html">config</a></h1> <p>Manage the npm configuration files</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm.commands.config(args, callback) |
|
||||
var val = npm.config.get(key) |
|
||||
npm.config.set(key, val)</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This function acts much the same way as the command-line version. The first |
|
||||
element in the array tells config what to do. Possible values are:</p> |
|
||||
|
|
||||
<ul><li><p><code>set</code></p><p>Sets a config parameter. The second element in <code>args</code> is interpreted as the |
|
||||
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 |
|
||||
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 |
|
||||
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 |
|
||||
programmatically, but it is made available.</p></li></ul> |
|
||||
|
|
||||
<p>To programmatically access npm configuration settings, or set them for |
|
||||
the duration of a program, use the <code>npm.config.set</code> and <code>npm.config.get</code> |
|
||||
functions instead.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">set — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,336 +0,0 @@ |
|||||
|
|
||||
/* reset */ |
|
||||
* { |
|
||||
margin:0; |
|
||||
padding:0; |
|
||||
border:none; |
|
||||
font-family:inherit; |
|
||||
font-size:inherit; |
|
||||
font-weight:inherit; |
|
||||
} |
|
||||
:target::before { |
|
||||
content:" >>> "; |
|
||||
position:absolute; |
|
||||
display:block; |
|
||||
opacity:0.5; |
|
||||
color:#f00; |
|
||||
margin:0 0 0 -2em; |
|
||||
} |
|
||||
abbr, acronym { |
|
||||
border-bottom:1px dotted #aaa; |
|
||||
} |
|
||||
kbd, code, pre { |
|
||||
font-family:monospace; |
|
||||
margin:0; |
|
||||
font-size:18px; |
|
||||
line-height:24px; |
|
||||
background:#eee; |
|
||||
outline:1px solid #ccc; |
|
||||
} |
|
||||
kbd code, kbd pre, kbd kbd, |
|
||||
pre code, pre pre, pre kbd, |
|
||||
code code, code pre, code kbd { outline: none } |
|
||||
.dollar::before { |
|
||||
content:"$ "; |
|
||||
display:inline; |
|
||||
} |
|
||||
p, ul, ol, dl, pre { |
|
||||
margin:30px 0; |
|
||||
line-height:30px; |
|
||||
} |
|
||||
hr { |
|
||||
margin:30px auto 29px; |
|
||||
width:66%; |
|
||||
height:1px; |
|
||||
background:#aaa; |
|
||||
} |
|
||||
pre { |
|
||||
display:block; |
|
||||
} |
|
||||
dd :first-child { |
|
||||
margin-top:0; |
|
||||
} |
|
||||
|
|
||||
body { |
|
||||
quotes:"“" "”" "‘" "’"; |
|
||||
width:666px; |
|
||||
margin:30px auto 120px; |
|
||||
font-family:Times New Roman, serif; |
|
||||
font-size:20px; |
|
||||
background:#fff; |
|
||||
line-height:30px; |
|
||||
color:#111; |
|
||||
} |
|
||||
|
|
||||
blockquote { |
|
||||
position:relative; |
|
||||
font-size:16px; |
|
||||
line-height:30px; |
|
||||
font-weight:bold; |
|
||||
width:85%; |
|
||||
margin:0 auto; |
|
||||
} |
|
||||
blockquote::before { |
|
||||
font-size:90px; |
|
||||
display:block; |
|
||||
position:absolute; |
|
||||
top:20px; |
|
||||
right:100%; |
|
||||
content:"“"; |
|
||||
padding-right:10px; |
|
||||
color:#ccc; |
|
||||
} |
|
||||
.source cite::before { |
|
||||
content:"— "; |
|
||||
} |
|
||||
.source { |
|
||||
padding-left:20%; |
|
||||
margin-top:30px; |
|
||||
} |
|
||||
.source cite span { |
|
||||
font-style:normal; |
|
||||
} |
|
||||
blockquote p { |
|
||||
margin-bottom:0; |
|
||||
} |
|
||||
.quote blockquote { |
|
||||
font-weight:normal; |
|
||||
} |
|
||||
|
|
||||
h1, h2, h3, h4, h5, h6, dt, #header { |
|
||||
font-family:serif; |
|
||||
font-size:20px; |
|
||||
font-weight:bold; |
|
||||
} |
|
||||
h2 { |
|
||||
background:#eee; |
|
||||
} |
|
||||
h1, h2 { |
|
||||
line-height:40px; |
|
||||
} |
|
||||
|
|
||||
i, em, cite { |
|
||||
font-style:italic; |
|
||||
} |
|
||||
b, strong { |
|
||||
font-weight:bold; |
|
||||
} |
|
||||
i, em, cite, b, strong, small { |
|
||||
line-height:28px; |
|
||||
} |
|
||||
small, .small, .small *, aside { |
|
||||
font-style:italic; |
|
||||
color:#669; |
|
||||
font-size:18px; |
|
||||
} |
|
||||
spall a, .small a { |
|
||||
text-decoration:underline; |
|
||||
} |
|
||||
del { |
|
||||
text-decoration:line-through; |
|
||||
} |
|
||||
ins { |
|
||||
text-decoration:underline; |
|
||||
} |
|
||||
.alignright { display:block; float:right; margin-left:1em; } |
|
||||
.alignleft { display:block; float:left; margin-right:1em; } |
|
||||
|
|
||||
q:before, q q q:before, q q q q q:before, q q q q q q q:before { content:"“"; } |
|
||||
q q:before, q q q q:before, q q q q q q:before, q q q q q q q q:before { content:"‘"; } |
|
||||
q:after, q q q:after, q q q q q:after, q q q q q q q:after { content:"”"; } |
|
||||
q q:after, q q q q:after, q q q q q q:after, q q q q q q q q:after { content:"’"; } |
|
||||
|
|
||||
a { color:#00f; text-decoration:none; } |
|
||||
a:visited { color:#636; } |
|
||||
a:hover, a:active { color:#900!important; text-decoration:underline; } |
|
||||
|
|
||||
h1 { |
|
||||
font-weight:bold; |
|
||||
background:#fff; |
|
||||
} |
|
||||
h1 a, h1 a:visited { |
|
||||
font-family:gubblefont, GubbleBum Blocky, GubbleBum, monospace; |
|
||||
font-size:60px; |
|
||||
color:#900; |
|
||||
display:block; |
|
||||
} |
|
||||
h1 a:focus, h1 a:hover, h1 a:active { |
|
||||
color:#f00!important; |
|
||||
text-decoration:none; |
|
||||
} |
|
||||
|
|
||||
.navigation { |
|
||||
display:table; |
|
||||
width:100%; |
|
||||
margin:0 0 30px 0; |
|
||||
position:relative; |
|
||||
} |
|
||||
#nav-above { |
|
||||
margin-bottom:0; |
|
||||
} |
|
||||
.navigation .nav-previous { |
|
||||
display:table-cell; |
|
||||
text-align:left; |
|
||||
width:50%; |
|
||||
} |
|
||||
/* hang the » and « off into the margins */ |
|
||||
.navigation .nav-previous a:before, .navigation .nav-next a:after { |
|
||||
content: "«"; |
|
||||
display:block; |
|
||||
height:30px; |
|
||||
margin-bottom:-30px; |
|
||||
text-decoration:none; |
|
||||
margin-left:-15px; |
|
||||
} |
|
||||
.navigation .nav-next a:after { |
|
||||
content: "»"; |
|
||||
text-align:right; |
|
||||
margin-left:0; |
|
||||
margin-top:-30px; |
|
||||
margin-right:-15px; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
.navigation .nav-next { |
|
||||
display:table-cell; |
|
||||
text-align:right; |
|
||||
width:50%; |
|
||||
} |
|
||||
.navigation a { |
|
||||
display:block; |
|
||||
width:100%; |
|
||||
height:100%; |
|
||||
} |
|
||||
|
|
||||
input, button, textarea { |
|
||||
border:0; |
|
||||
line-height:30px; |
|
||||
} |
|
||||
textarea { |
|
||||
height:300px; |
|
||||
} |
|
||||
input { |
|
||||
height:30px; |
|
||||
line-height:30px; |
|
||||
} |
|
||||
input.submit, input#submit, input.button, button, input[type=submit] { |
|
||||
cursor:hand; cursor:pointer; |
|
||||
outline:1px solid #ccc; |
|
||||
} |
|
||||
|
|
||||
#wrapper { |
|
||||
margin-bottom:90px; |
|
||||
position:relative; |
|
||||
z-index:1; |
|
||||
*zoom:1; |
|
||||
background:#fff; |
|
||||
} |
|
||||
#wrapper:after { |
|
||||
display:block; |
|
||||
content:"."; |
|
||||
visibility:hidden; |
|
||||
width:0; |
|
||||
height:0; |
|
||||
clear:both; |
|
||||
} |
|
||||
|
|
||||
.sidebar .xoxo > li { |
|
||||
float:left; |
|
||||
width:50%; |
|
||||
} |
|
||||
.sidebar li { |
|
||||
list-style:none; |
|
||||
} |
|
||||
.sidebar #elsewhere { |
|
||||
margin-left:-10%; |
|
||||
margin-right:-10%; |
|
||||
} |
|
||||
.sidebar #rss-links, .sidebar #twitter-feeds { |
|
||||
float:right; |
|
||||
clear:right; |
|
||||
width:20%; |
|
||||
} |
|
||||
.sidebar #comment { |
|
||||
clear:both; |
|
||||
float:none; |
|
||||
width:100%; |
|
||||
} |
|
||||
.sidebar #search { |
|
||||
clear:both; |
|
||||
float:none; |
|
||||
width:100%; |
|
||||
} |
|
||||
.sidebar #search h2 { |
|
||||
margin-left:40%; |
|
||||
} |
|
||||
.sidebar #search #s { |
|
||||
width:90%; |
|
||||
float:left; |
|
||||
} |
|
||||
.sidebar #search #searchsubmit { |
|
||||
width:10%; |
|
||||
float:right; |
|
||||
} |
|
||||
.sidebar * { |
|
||||
font-size:15px; |
|
||||
line-height:30px; |
|
||||
} |
|
||||
|
|
||||
#footer, #footer * { |
|
||||
text-align:right; |
|
||||
font-size:16px; |
|
||||
color:#ccc; |
|
||||
font-style:italic; |
|
||||
word-spacing:1em; |
|
||||
} |
|
||||
|
|
||||
#toc { |
|
||||
position:absolute; |
|
||||
top:0; |
|
||||
right:0; |
|
||||
padding:40px 0 40px 20px; |
|
||||
margin:0; |
|
||||
width:200px; |
|
||||
opacity:0.2; |
|
||||
z-index:-1; |
|
||||
} |
|
||||
#toc:hover { |
|
||||
opacity:1; |
|
||||
background:#fff; |
|
||||
z-index:999; |
|
||||
} |
|
||||
#toc ul { |
|
||||
padding:0; |
|
||||
margin:0; |
|
||||
} |
|
||||
#toc, #toc li { |
|
||||
list-style-type:none; |
|
||||
font-size:15px; |
|
||||
line-height:15px; |
|
||||
} |
|
||||
#toc li { |
|
||||
padding:0 0 0 10px; |
|
||||
} |
|
||||
#toc li a { |
|
||||
position:relative; |
|
||||
display:block; |
|
||||
} |
|
||||
|
|
||||
@font-face { |
|
||||
font-family:gubblefont; |
|
||||
src: url(./GubbleBum-Blocky.ttf) format("truetype"); |
|
||||
} |
|
||||
|
|
||||
@media print { |
|
||||
a[href] { |
|
||||
color:inherit; |
|
||||
} |
|
||||
a[href]:after { |
|
||||
white-space:nowrap; |
|
||||
content:" " attr(href); |
|
||||
} |
|
||||
a[href^=\#], .navigation { |
|
||||
display:none; |
|
||||
} |
|
||||
} |
|
||||
|
|
Binary file not shown.
@ -1,69 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>author</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/owner.html">owner</a></h1> <p>Manage package owners</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm owner ls <package name> |
|
||||
npm owner add <user> <package name> |
|
||||
npm owner rm <user> <package name></code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>Manage ownership of published packages.</p> |
|
||||
|
|
||||
<ul><li>ls: |
|
||||
List all the users who have access to modify a package and push new versions. |
|
||||
Handy when you need to know who to bug for help.</li><li>add: |
|
||||
Add a new user as a maintainer of a package. This user is enabled to modify |
|
||||
metadata, publish new versions, and add other owners.</li><li>rm: |
|
||||
Remove a user from the package owner list. This immediately revokes their |
|
||||
privileges.</li></ul> |
|
||||
|
|
||||
<p>Note that there is only one level of access. Either you can modify a package, |
|
||||
or you can't. Future versions may contain more fine-grained access levels, but |
|
||||
that is not implemented at this time.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">author — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,75 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>find</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/search.html">search</a></h1> <p>Search for packages</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm search [search terms ...]</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>Search the registry for packages matching the search terms.</p> |
|
||||
|
|
||||
<h2 id="CONFIGURATION">CONFIGURATION</h2> |
|
||||
|
|
||||
<h3 id="description">description</h3> |
|
||||
|
|
||||
<ul><li>Default: true</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show the description in <code>npm search</code></p> |
|
||||
|
|
||||
<h3 id="searchopts">searchopts</h3> |
|
||||
|
|
||||
<ul><li>Default: ""</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>Space-separated options that are always passed to search.</p> |
|
||||
|
|
||||
<h3 id="searchexclude">searchexclude</h3> |
|
||||
|
|
||||
<ul><li>Default: ""</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>Space-separated options that limit the results from search.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">find — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,621 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>get</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/config.html">config</a></h1> <p>Manage the npm configuration file</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm config set <key> <value> [--global] |
|
||||
npm config get <key> |
|
||||
npm config delete <key> |
|
||||
npm config list |
|
||||
npm config edit |
|
||||
npm get <key> |
|
||||
npm set <key> <value> [--global]</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>npm gets its configuration values from 6 sources, in this priority:</p> |
|
||||
|
|
||||
<h3 id="Command-Line-Flags">Command Line Flags</h3> |
|
||||
|
|
||||
<p>Putting <code>--foo bar</code> on the command line sets the |
|
||||
<code>foo</code> configuration parameter to <code>"bar"</code>. A <code>--</code> argument tells the cli |
|
||||
parser to stop reading flags. A <code>--flag</code> parameter that is at the <em>end</em> of |
|
||||
the command will be given the value of <code>true</code>.</p> |
|
||||
|
|
||||
<h3 id="Environment-Variables">Environment Variables</h3> |
|
||||
|
|
||||
<p>Any environment variables that start with <code>npm_config_</code> will be interpreted |
|
||||
as a configuration parameter. For example, putting <code>npm_config_foo=bar</code> in |
|
||||
your environment will set the <code>foo</code> configuration parameter to <code>bar</code>. Any |
|
||||
environment configurations that are not given a value will be given the value |
|
||||
of <code>true</code>. Config values are case-insensitive, so <code>NPM_CONFIG_FOO=bar</code> will |
|
||||
work the same.</p> |
|
||||
|
|
||||
<h3 id="Per-user-config-file">Per-user config file</h3> |
|
||||
|
|
||||
<p><code>$HOME/.npmrc</code> (or the <code>userconfig</code> param, if set above)</p> |
|
||||
|
|
||||
<p>This file is an ini-file formatted list of <code>key = value</code> parameters.</p> |
|
||||
|
|
||||
<h3 id="Global-config-file">Global config file</h3> |
|
||||
|
|
||||
<p><code>$PREFIX/etc/npmrc</code> (or the <code>globalconfig</code> param, if set above): |
|
||||
This file is an ini-file formatted list of <code>key = value</code> parameters</p> |
|
||||
|
|
||||
<h3 id="Built-in-config-file">Built-in config file</h3> |
|
||||
|
|
||||
<p><code>path/to/npm/itself/npmrc</code></p> |
|
||||
|
|
||||
<p>This is an unchangeable "builtin" |
|
||||
configuration file that npm keeps consistent across updates. Set |
|
||||
fields in here using the <code>./configure</code> script that comes with npm. |
|
||||
This is primarily for distribution maintainers to override default |
|
||||
configs in a standard and consistent manner.</p> |
|
||||
|
|
||||
<h3 id="Default-Configs">Default Configs</h3> |
|
||||
|
|
||||
<p>A set of configuration parameters that are internal to npm, and are |
|
||||
defaults if nothing else is specified.</p> |
|
||||
|
|
||||
<h2 id="Sub-commands">Sub-commands</h2> |
|
||||
|
|
||||
<p>Config supports the following sub-commands:</p> |
|
||||
|
|
||||
<h3 id="set">set</h3> |
|
||||
|
|
||||
<pre><code>npm config set key value</code></pre> |
|
||||
|
|
||||
<p>Sets the config key to the value.</p> |
|
||||
|
|
||||
<p>If value is omitted, then it sets it to "true".</p> |
|
||||
|
|
||||
<h3 id="get">get</h3> |
|
||||
|
|
||||
<pre><code>npm config get key</code></pre> |
|
||||
|
|
||||
<p>Echo the config value to stdout.</p> |
|
||||
|
|
||||
<h3 id="list">list</h3> |
|
||||
|
|
||||
<pre><code>npm config list</code></pre> |
|
||||
|
|
||||
<p>Show all the config settings.</p> |
|
||||
|
|
||||
<h3 id="delete">delete</h3> |
|
||||
|
|
||||
<pre><code>npm config delete key</code></pre> |
|
||||
|
|
||||
<p>Deletes the key from all configuration files.</p> |
|
||||
|
|
||||
<h3 id="edit">edit</h3> |
|
||||
|
|
||||
<pre><code>npm config edit</code></pre> |
|
||||
|
|
||||
<p>Opens the config file in an editor. Use the <code>--global</code> flag to edit the |
|
||||
global config.</p> |
|
||||
|
|
||||
<h2 id="Shorthands-and-Other-CLI-Niceties">Shorthands and Other CLI Niceties</h2> |
|
||||
|
|
||||
<p>The following shorthands are parsed on the command-line:</p> |
|
||||
|
|
||||
<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>-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>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</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> |
|
||||
|
|
||||
<p>If the specified configuration param resolves unambiguously to a known |
|
||||
configuration parameter, then it is expanded to that configuration |
|
||||
parameter. For example:</p> |
|
||||
|
|
||||
<pre><code>npm ls --par |
|
||||
# same as: |
|
||||
npm ls --parseable</code></pre> |
|
||||
|
|
||||
<p>If multiple single-character shorthands are strung together, and the |
|
||||
resulting combination is unambiguously not some other configuration |
|
||||
param, then it is expanded to its various component pieces. For |
|
||||
example:</p> |
|
||||
|
|
||||
<pre><code>npm ls -gpld |
|
||||
# same as: |
|
||||
npm ls --global --parseable --long --loglevel info</code></pre> |
|
||||
|
|
||||
<h2 id="Per-Package-Config-Settings">Per-Package Config Settings</h2> |
|
||||
|
|
||||
<p>When running scripts (see <code><a href="../doc/scripts.html">scripts(1)</a></code>) |
|
||||
the package.json "config" keys are overwritten in the environment if |
|
||||
there is a config param of <code><name>[@<version>]:<key></code>. For example, if |
|
||||
the package.json has this:</p> |
|
||||
|
|
||||
<pre><code>{ "name" : "foo" |
|
||||
, "config" : { "port" : "8080" } |
|
||||
, "scripts" : { "start" : "node server.js" } }</code></pre> |
|
||||
|
|
||||
<p>and the server.js is this:</p> |
|
||||
|
|
||||
<pre><code>http.createServer(...).listen(process.env.npm_package_config_port)</code></pre> |
|
||||
|
|
||||
<p>then the user could change the behavior by doing:</p> |
|
||||
|
|
||||
<pre><code>npm config set foo:port 80</code></pre> |
|
||||
|
|
||||
<h2 id="Config-Settings">Config Settings</h2> |
|
||||
|
|
||||
<h3 id="always-auth">always-auth</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Force npm to always require authentication when accessing the registry, |
|
||||
even for <code>GET</code> requests.</p> |
|
||||
|
|
||||
<h3 id="bin-publish">bin-publish</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>If set to true, then binary packages will be created on publish.</p> |
|
||||
|
|
||||
<p>This is the way to opt into the "bindist" behavior described below.</p> |
|
||||
|
|
||||
<h3 id="bindist">bindist</h3> |
|
||||
|
|
||||
<ul><li>Default: Unstable node versions, <code>null</code>, otherwise |
|
||||
<code>"<node version>-<platform>-<os release>"</code></li><li>Type: String or <code>null</code></li></ul> |
|
||||
|
|
||||
<p>Experimental: on stable versions of node, binary distributions will be |
|
||||
created with this tag. If a user then installs that package, and their |
|
||||
<code>bindist</code> tag is found in the list of binary distributions, they will |
|
||||
get that prebuilt version.</p> |
|
||||
|
|
||||
<p>Pre-build node packages have their preinstall, install, and postinstall |
|
||||
scripts stripped (since they are run prior to publishing), and do not |
|
||||
have their <code>build</code> directories automatically ignored.</p> |
|
||||
|
|
||||
<p>It's yet to be seen if this is a good idea.</p> |
|
||||
|
|
||||
<h3 id="browser">browser</h3> |
|
||||
|
|
||||
<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>The browser that is called by the <code>npm docs</code> command to open websites.</p> |
|
||||
|
|
||||
<h3 id="ca">ca</h3> |
|
||||
|
|
||||
<ul><li>Default: The npm CA certificate</li><li>Type: String or null</li></ul> |
|
||||
|
|
||||
<p>The Certificate Authority signing certificate that is trusted for SSL |
|
||||
connections to the registry.</p> |
|
||||
|
|
||||
<p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert |
|
||||
to trust only that specific signing authority.</p> |
|
||||
|
|
||||
<p>See also the <code>strict-ssl</code> config.</p> |
|
||||
|
|
||||
<h3 id="cache">cache</h3> |
|
||||
|
|
||||
<ul><li>Default: Windows: <code>~/npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The location of npm's cache directory. See <code><a href="../doc/cache.html">cache(1)</a></code></p> |
|
||||
|
|
||||
<h3 id="color">color</h3> |
|
||||
|
|
||||
<ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>"always"</code></li></ul> |
|
||||
|
|
||||
<p>If false, never shows colors. If <code>"always"</code> then always shows colors. |
|
||||
If true, then only prints color codes for tty file descriptors.</p> |
|
||||
|
|
||||
<h3 id="depth">depth</h3> |
|
||||
|
|
||||
<ul><li>Default: Infinity</li><li>Type: Number</li></ul> |
|
||||
|
|
||||
<p>The depth to go when recursing directories for <code>npm ls</code> and |
|
||||
<code>npm cache ls</code>.</p> |
|
||||
|
|
||||
<h3 id="description">description</h3> |
|
||||
|
|
||||
<ul><li>Default: true</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show the description in <code>npm search</code></p> |
|
||||
|
|
||||
<h3 id="dev">dev</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Install <code>dev-dependencies</code> along with packages.</p> |
|
||||
|
|
||||
<p>Note that <code>dev-dependencies</code> are also installed if the <code>npat</code> flag is |
|
||||
set.</p> |
|
||||
|
|
||||
<h3 id="editor">editor</h3> |
|
||||
|
|
||||
<ul><li>Default: <code>EDITOR</code> environment variable if set, or <code>"vi"</code> on Posix, |
|
||||
or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p> |
|
||||
|
|
||||
<h3 id="force">force</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Makes various commands more forceful.</p> |
|
||||
|
|
||||
<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> |
|
||||
|
|
||||
<h3 id="global">global</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Operates in "global" mode, so that packages are installed into the |
|
||||
<code>prefix</code> folder instead of the current working directory. See |
|
||||
<code><a href="../doc/folders.html">folders(1)</a></code> for more on the differences in behavior.</p> |
|
||||
|
|
||||
<ul><li>packages are installed into the <code>prefix/node_modules</code> folder, instead of the |
|
||||
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> |
|
||||
|
|
||||
<h3 id="globalconfig">globalconfig</h3> |
|
||||
|
|
||||
<ul><li>Default: {prefix}/etc/npmrc</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The config file to read for global config options.</p> |
|
||||
|
|
||||
<h3 id="globalignorefile">globalignorefile</h3> |
|
||||
|
|
||||
<ul><li>Default: {prefix}/etc/npmignore</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The config file to read for global ignore patterns to apply to all users |
|
||||
and all projects.</p> |
|
||||
|
|
||||
<p>If not found, but there is a "gitignore" file in the |
|
||||
same directory, then that will be used instead.</p> |
|
||||
|
|
||||
<h3 id="group">group</h3> |
|
||||
|
|
||||
<ul><li>Default: GID of the current process</li><li>Type: String or Number</li></ul> |
|
||||
|
|
||||
<p>The group to use when running package scripts in global mode as the root |
|
||||
user.</p> |
|
||||
|
|
||||
<h3 id="https-proxy">https-proxy</h3> |
|
||||
|
|
||||
<ul><li>Default: the <code>HTTPS_PROXY</code> or <code>https_proxy</code> or <code>HTTP_PROXY</code> or |
|
||||
<code>http_proxy</code> environment variables.</li><li>Type: url</li></ul> |
|
||||
|
|
||||
<p>A proxy to use for outgoing https requests.</p> |
|
||||
|
|
||||
<h3 id="ignore">ignore</h3> |
|
||||
|
|
||||
<ul><li>Default: ""</li><li>Type: string</li></ul> |
|
||||
|
|
||||
<p>A white-space separated list of glob patterns of files to always exclude |
|
||||
from packages when building tarballs.</p> |
|
||||
|
|
||||
<h3 id="init-version">init.version</h3> |
|
||||
|
|
||||
<ul><li>Default: "0.0.0"</li><li>Type: semver</li></ul> |
|
||||
|
|
||||
<p>The value <code>npm init</code> should use by default for the package version.</p> |
|
||||
|
|
||||
<h3 id="init-author-name">init.author.name</h3> |
|
||||
|
|
||||
<ul><li>Default: "0.0.0"</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>The value <code>npm init</code> should use by default for the package author's name.</p> |
|
||||
|
|
||||
<h3 id="init-author-email">init.author.email</h3> |
|
||||
|
|
||||
<ul><li>Default: ""</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>The value <code>npm init</code> should use by default for the package author's email.</p> |
|
||||
|
|
||||
<h3 id="init-author-url">init.author.url</h3> |
|
||||
|
|
||||
<ul><li>Default: ""</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>The value <code>npm init</code> should use by default for the package author's homepage.</p> |
|
||||
|
|
||||
<h3 id="link">link</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>If true, then local installs will link if there is a suitable globally |
|
||||
installed package.</p> |
|
||||
|
|
||||
<p>Note that this means that local installs can cause things to be |
|
||||
installed into the global space at the same time. The link is only done |
|
||||
if one of the two conditions are met:</p> |
|
||||
|
|
||||
<ul><li>The package is not already installed globally, or</li><li>the globally installed version is identical to the version that is |
|
||||
being installed locally.</li></ul> |
|
||||
|
|
||||
<h3 id="logfd">logfd</h3> |
|
||||
|
|
||||
<ul><li>Default: stderr file descriptor</li><li>Type: Number or Stream</li></ul> |
|
||||
|
|
||||
<p>The location to write log output.</p> |
|
||||
|
|
||||
<h3 id="loglevel">loglevel</h3> |
|
||||
|
|
||||
<ul><li>Default: "warn"</li><li>Type: String</li><li>Values: "silent", "win", "error", "warn", "info", "verbose", "silly"</li></ul> |
|
||||
|
|
||||
<p>What level of logs to report. On failure, <em>all</em> logs are written to |
|
||||
<code>npm-debug.log</code> in the current working directory.</p> |
|
||||
|
|
||||
<h3 id="logprefix">logprefix</h3> |
|
||||
|
|
||||
<ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Whether or not to prefix log messages with "npm" and the log level. See |
|
||||
also "color" and "loglevel".</p> |
|
||||
|
|
||||
<h3 id="long">long</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show extended information in <code>npm ls</code></p> |
|
||||
|
|
||||
<h3 id="message">message</h3> |
|
||||
|
|
||||
<ul><li>Default: "%s"</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>Commit message which is used by <code>npm version</code> when creating version commit.</p> |
|
||||
|
|
||||
<p>Any "%s" in the message will be replaced with the version number.</p> |
|
||||
|
|
||||
<h3 id="node-version">node-version</h3> |
|
||||
|
|
||||
<ul><li>Default: process.version</li><li>Type: semver or false</li></ul> |
|
||||
|
|
||||
<p>The node version to use when checking package's "engines" hash.</p> |
|
||||
|
|
||||
<h3 id="npat">npat</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Run tests on installation and report results to the |
|
||||
<code>npaturl</code>.</p> |
|
||||
|
|
||||
<h3 id="npaturl">npaturl</h3> |
|
||||
|
|
||||
<ul><li>Default: Not yet implemented</li><li>Type: url</li></ul> |
|
||||
|
|
||||
<p>The url to report npat test results.</p> |
|
||||
|
|
||||
<h3 id="onload-script">onload-script</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>A node module to <code>require()</code> when npm loads. Useful for programmatic |
|
||||
usage.</p> |
|
||||
|
|
||||
<h3 id="outfd">outfd</h3> |
|
||||
|
|
||||
<ul><li>Default: standard output file descriptor</li><li>Type: Number or Stream</li></ul> |
|
||||
|
|
||||
<p>Where to write "normal" output. This has no effect on log output.</p> |
|
||||
|
|
||||
<h3 id="parseable">parseable</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Output parseable results from commands that write to |
|
||||
standard output.</p> |
|
||||
|
|
||||
<h3 id="prefix">prefix</h3> |
|
||||
|
|
||||
<ul><li>Default: node's process.installPrefix</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The location to install global items. If set on the command line, then |
|
||||
it forces non-global commands to run in the specified folder.</p> |
|
||||
|
|
||||
<h3 id="production">production</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Set to true to run in "production" mode.</p> |
|
||||
|
|
||||
<ol><li>devDependencies are not installed at the topmost level when running |
|
||||
local <code>npm install</code> without any arguments.</li><li>Set the NODE_ENV="production" for lifecycle scripts.</li></ol> |
|
||||
|
|
||||
<h3 id="proxy">proxy</h3> |
|
||||
|
|
||||
<ul><li>Default: <code>HTTP_PROXY</code> or <code>http_proxy</code> environment variable, or null</li><li>Type: url</li></ul> |
|
||||
|
|
||||
<p>A proxy to use for outgoing http requests.</p> |
|
||||
|
|
||||
<h3 id="rebuild-bundle">rebuild-bundle</h3> |
|
||||
|
|
||||
<ul><li>Default: true</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Rebuild bundled dependencies after installation.</p> |
|
||||
|
|
||||
<h3 id="registry">registry</h3> |
|
||||
|
|
||||
<ul><li>Default: https://registry.npmjs.org/</li><li>Type: url</li></ul> |
|
||||
|
|
||||
<p>The base URL of the npm package registry.</p> |
|
||||
|
|
||||
<h3 id="rollback">rollback</h3> |
|
||||
|
|
||||
<ul><li>Default: true</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Remove failed installs.</p> |
|
||||
|
|
||||
<h3 id="save">save</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Save installed packages to a package.json file as dependencies.</p> |
|
||||
|
|
||||
<p>Only works if there is already a package.json file present.</p> |
|
||||
|
|
||||
<h3 id="searchopts">searchopts</h3> |
|
||||
|
|
||||
<ul><li>Default: ""</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>Space-separated options that are always passed to search.</p> |
|
||||
|
|
||||
<h3 id="searchexclude">searchexclude</h3> |
|
||||
|
|
||||
<ul><li>Default: ""</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>Space-separated options that limit the results from search.</p> |
|
||||
|
|
||||
<h3 id="shell">shell</h3> |
|
||||
|
|
||||
<ul><li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on |
|
||||
Windows</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The shell to run for the <code>npm explore</code> command.</p> |
|
||||
|
|
||||
<h3 id="strict-ssl">strict-ssl</h3> |
|
||||
|
|
||||
<ul><li>Default: true</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Whether or not to do SSL key validation when making requests to the |
|
||||
registry via https.</p> |
|
||||
|
|
||||
<p>See also the <code>ca</code> config.</p> |
|
||||
|
|
||||
<h3 id="tag">tag</h3> |
|
||||
|
|
||||
<ul><li>Default: latest</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>If you ask npm to install a package and don't tell it a specific version, then |
|
||||
it will install the specified tag.</p> |
|
||||
|
|
||||
<p>Also the tag that is added to the package@version specified by the <code>npm |
|
||||
tag</code> command, if no explicit tag is given.</p> |
|
||||
|
|
||||
<h3 id="tmp">tmp</h3> |
|
||||
|
|
||||
<ul><li>Default: TMPDIR environment variable, or "/tmp"</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>Where to store temporary files and folders. All temp files are deleted |
|
||||
on success, but left behind on failure for forensic purposes.</p> |
|
||||
|
|
||||
<h3 id="unicode">unicode</h3> |
|
||||
|
|
||||
<ul><li>Default: true</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>When set to true, npm uses unicode characters in the tree output. When |
|
||||
false, it uses ascii characters to draw trees.</p> |
|
||||
|
|
||||
<h3 id="unsafe-perm">unsafe-perm</h3> |
|
||||
|
|
||||
<ul><li>Default: false if running as root, true otherwise</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Set to true to suppress the UID/GID switching when running package |
|
||||
scripts. If set explicitly to false, then installing as a non-root user |
|
||||
will fail.</p> |
|
||||
|
|
||||
<h3 id="usage">usage</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Set to show short usage output (like the -H output) |
|
||||
instead of complete help when doing <code><a href="../doc/help.html">help(1)</a></code>.</p> |
|
||||
|
|
||||
<h3 id="user">user</h3> |
|
||||
|
|
||||
<ul><li>Default: "nobody"</li><li>Type: String or Number</li></ul> |
|
||||
|
|
||||
<p>The UID to set to when running package scripts as root.</p> |
|
||||
|
|
||||
<h3 id="username">username</h3> |
|
||||
|
|
||||
<ul><li>Default: null</li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>The username on the npm registry. Set with <code>npm adduser</code></p> |
|
||||
|
|
||||
<h3 id="userconfig">userconfig</h3> |
|
||||
|
|
||||
<ul><li>Default: ~/.npmrc</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The location of user-level configuration settings.</p> |
|
||||
|
|
||||
<h3 id="userignorefile">userignorefile</h3> |
|
||||
|
|
||||
<ul><li>Default: ~/.npmignore</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The location of a user-level ignore file to apply to all packages.</p> |
|
||||
|
|
||||
<p>If not found, but there is a .gitignore file in the same directory, then |
|
||||
that will be used instead.</p> |
|
||||
|
|
||||
<h3 id="umask">umask</h3> |
|
||||
|
|
||||
<ul><li>Default: 022</li><li>Type: Octal numeric string</li></ul> |
|
||||
|
|
||||
<p>The "umask" value to use when setting the file creation mode on files |
|
||||
and folders.</p> |
|
||||
|
|
||||
<p>Folders and executables are given a mode which is <code>0777</code> masked against |
|
||||
this value. Other files are given a mode which is <code>0666</code> masked against |
|
||||
this value. Thus, the defaults are <code>0755</code> and <code>0644</code> respectively.</p> |
|
||||
|
|
||||
<h3 id="version">version</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: boolean</li></ul> |
|
||||
|
|
||||
<p>If true, output the npm version and exit successfully.</p> |
|
||||
|
|
||||
<p>Only relevant when specified explicitly on the command line.</p> |
|
||||
|
|
||||
<h3 id="viewer">viewer</h3> |
|
||||
|
|
||||
<ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul> |
|
||||
|
|
||||
<p>The program to use to view help content.</p> |
|
||||
|
|
||||
<p>Set to <code>"browser"</code> to view html help content in the default web browser.</p> |
|
||||
|
|
||||
<h3 id="yes">yes</h3> |
|
||||
|
|
||||
<ul><li>Default: null</li><li>Type: Boolean or null</li></ul> |
|
||||
|
|
||||
<p>If set to <code>null</code>, then prompt the user for responses in some |
|
||||
circumstances.</p> |
|
||||
|
|
||||
<p>If set to <code>true</code>, then answer "yes" to any prompt. If set to <code>false</code> |
|
||||
then answer "no" to any prompt.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">get — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,240 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>global</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/folders.html">folders</a></h1> <p>Folder Structures Used by npm</p> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>npm puts various things on your computer. That's its job.</p> |
|
||||
|
|
||||
<p>This document will tell you what it puts where.</p> |
|
||||
|
|
||||
<h3 id="tl-dr">tl;dr</h3> |
|
||||
|
|
||||
<ul><li>Local install (default): puts stuff in <code>./node_modules</code> of the current |
|
||||
package root.</li><li>Global install (with <code>-g</code>): puts stuff in /usr/local or wherever node |
|
||||
is installed.</li><li>Install it <strong>locally</strong> if you're going to <code>require()</code> it.</li><li>Install it <strong>globally</strong> if you're going to run it on the command line.</li><li>If you need both, then install it in both places, or use <code>npm link</code>.</li></ul> |
|
||||
|
|
||||
<h3 id="prefix-Configuration">prefix Configuration</h3> |
|
||||
|
|
||||
<p>The <code>prefix</code> config defaults to the location where node is installed. |
|
||||
On most systems, this is <code>/usr/local</code>, and most of the time is the same |
|
||||
as node's <code>process.installPrefix</code>.</p> |
|
||||
|
|
||||
<p>On windows, this is the exact location of the node.exe binary. On Unix |
|
||||
systems, it's one level up, since node is typically installed at |
|
||||
<code>{prefix}/bin/node</code> rather than <code>{prefix}/node.exe</code>.</p> |
|
||||
|
|
||||
<p>When the <code>global</code> flag is set, npm installs things into this prefix. |
|
||||
When it is not set, it uses the root of the current package, or the |
|
||||
current working directory if not in a package already.</p> |
|
||||
|
|
||||
<h3 id="Node-Modules">Node Modules</h3> |
|
||||
|
|
||||
<p>Packages are dropped into the <code>node_modules</code> folder under the <code>prefix</code>. |
|
||||
When installing locally, this means that you can |
|
||||
<code>require("packagename")</code> to load its main module, or |
|
||||
<code>require("packagename/lib/path/to/sub/module")</code> to load other modules.</p> |
|
||||
|
|
||||
<p>Global installs on Unix systems go to <code>{prefix}/lib/node_modules</code>. |
|
||||
Global installs on Windows go to <code>{prefix}/node_modules</code> (that is, no |
|
||||
<code>lib</code> folder.)</p> |
|
||||
|
|
||||
<p>If you wish to <code>require()</code> a package, then install it locally.</p> |
|
||||
|
|
||||
<h3 id="Executables">Executables</h3> |
|
||||
|
|
||||
<p>When in global mode, executables are linked into <code>{prefix}/bin</code> on Unix, |
|
||||
or directly into <code>{prefix}</code> on Windows.</p> |
|
||||
|
|
||||
<p>When in local mode, executables are linked into |
|
||||
<code>./node_modules/.bin</code> so that they can be made available to scripts run |
|
||||
through npm. (For example, so that a test runner will be in the path |
|
||||
when you run <code>npm test</code>.)</p> |
|
||||
|
|
||||
<h3 id="Man-Pages">Man Pages</h3> |
|
||||
|
|
||||
<p>When in global mode, man pages are linked into <code>{prefix}/share/man</code>.</p> |
|
||||
|
|
||||
<p>When in local mode, man pages are not installed.</p> |
|
||||
|
|
||||
<p>Man pages are not installed on Windows systems.</p> |
|
||||
|
|
||||
<h3 id="Cache">Cache</h3> |
|
||||
|
|
||||
<p>See <code><a href="../doc/cache.html">cache(1)</a></code>. Cache files are stored in <code>~/.npm</code> on Posix, or |
|
||||
<code>~/npm-cache</code> on Windows.</p> |
|
||||
|
|
||||
<p>This is controlled by the <code>cache</code> configuration param.</p> |
|
||||
|
|
||||
<h3 id="Temp-Files">Temp Files</h3> |
|
||||
|
|
||||
<p>Temporary files are stored by default in the folder specified by the |
|
||||
<code>tmp</code> config, which defaults to the TMPDIR, TMP, or TEMP environment |
|
||||
variables, or <code>/tmp</code> on Unix and <code>c:\windows\temp</code> on Windows.</p> |
|
||||
|
|
||||
<p>Temp files are given a unique folder under this root for each run of the |
|
||||
program, and are deleted upon successful exit.</p> |
|
||||
|
|
||||
<h2 id="More-Information">More Information</h2> |
|
||||
|
|
||||
<p>When installing locally, npm first tries to find an appropriate |
|
||||
<code>prefix</code> folder. This is so that <code>npm install foo@1.2.3</code> will install |
|
||||
to the sensible root of your package, even if you happen to have <code>cd</code>ed |
|
||||
into some other folder.</p> |
|
||||
|
|
||||
<p>Starting at the $PWD, npm will walk up the folder tree checking for a |
|
||||
folder that contains either a <code>package.json</code> file, or a <code>node_modules</code> |
|
||||
folder. If such a thing is found, then that is treated as the effective |
|
||||
"current directory" for the purpose of running npm commands. (This |
|
||||
behavior is inspired by and similar to git's .git-folder seeking |
|
||||
logic when running git commands in a working dir.)</p> |
|
||||
|
|
||||
<p>If no package root is found, then the current folder is used.</p> |
|
||||
|
|
||||
<p>When you run <code>npm install foo@1.2.3</code>, then the package is loaded into |
|
||||
the cache, and then unpacked into <code>./node_modules/foo</code>. Then, any of |
|
||||
foo's dependencies are similarly unpacked into |
|
||||
<code>./node_modules/foo/node_modules/...</code>.</p> |
|
||||
|
|
||||
<p>Any bin files are symlinked to <code>./node_modules/.bin/</code>, so that they may |
|
||||
be found by npm scripts when necessary.</p> |
|
||||
|
|
||||
<h3 id="Global-Installation">Global Installation</h3> |
|
||||
|
|
||||
<p>If the <code>global</code> configuration is set to true, then npm will |
|
||||
install packages "globally".</p> |
|
||||
|
|
||||
<p>For global installation, packages are installed roughly the same way, |
|
||||
but using the folders described above.</p> |
|
||||
|
|
||||
<h3 id="Cycles-Conflicts-and-Folder-Parsimony">Cycles, Conflicts, and Folder Parsimony</h3> |
|
||||
|
|
||||
<p>Cycles are handled using the property of node's module system that it |
|
||||
walks up the directories looking for <code>node_modules</code> folders. So, at every |
|
||||
stage, if a package is already installed in an ancestor <code>node_modules</code> |
|
||||
folder, then it is not installed at the current location.</p> |
|
||||
|
|
||||
<p>Consider the case above, where <code>foo -> bar -> baz</code>. Imagine if, in |
|
||||
addition to that, baz depended on bar, so you'd have: |
|
||||
<code>foo -> bar -> baz -> bar -> baz ...</code>. However, since the folder |
|
||||
structure is: <code>foo/node_modules/bar/node_modules/baz</code>, there's no need to |
|
||||
put another copy of bar into <code>.../baz/node_modules</code>, since when it calls |
|
||||
require("bar"), it will get the copy that is installed in |
|
||||
<code>foo/node_modules/bar</code>.</p> |
|
||||
|
|
||||
<p>This shortcut is only used if the exact same |
|
||||
version would be installed in multiple nested <code>node_modules</code> folders. It |
|
||||
is still possible to have <code>a/node_modules/b/node_modules/a</code> if the two |
|
||||
"a" packages are different versions. However, without repeating the |
|
||||
exact same package multiple times, an infinite regress will always be |
|
||||
prevented.</p> |
|
||||
|
|
||||
<p>Another optimization can be made by installing dependencies at the |
|
||||
highest level possible, below the localized "target" folder.</p> |
|
||||
|
|
||||
<h4 id="Example">Example</h4> |
|
||||
|
|
||||
<p>Consider this dependency graph:</p> |
|
||||
|
|
||||
<pre><code>foo |
|
||||
+-- blerg@1.2.5 |
|
||||
+-- bar@1.2.3 |
|
||||
| +-- blerg@1.x (latest=1.3.7) |
|
||||
| +-- baz@2.x |
|
||||
| | `-- quux@3.x |
|
||||
| | `-- bar@1.2.3 (cycle) |
|
||||
| `-- asdf@* |
|
||||
`-- baz@1.2.3 |
|
||||
`-- quux@3.x |
|
||||
`-- bar</code></pre> |
|
||||
|
|
||||
<p>In this case, we might expect a folder structure like this:</p> |
|
||||
|
|
||||
<pre><code>foo |
|
||||
+-- node_modules |
|
||||
+-- blerg (1.2.5) <---[A] |
|
||||
+-- bar (1.2.3) <---[B] |
|
||||
| +-- node_modules |
|
||||
| | `-- baz (2.0.2) <---[C] |
|
||||
| | `-- node_modules |
|
||||
| | `-- quux (3.2.0) |
|
||||
| `-- asdf (2.3.4) |
|
||||
`-- baz (1.2.3) <---[D] |
|
||||
`-- node_modules |
|
||||
`-- quux (3.2.0) <---[E]</code></pre> |
|
||||
|
|
||||
<p>Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are |
|
||||
installed in foo's <code>node_modules</code> folder.</p> |
|
||||
|
|
||||
<p>Even though the latest copy of blerg is 1.3.7, foo has a specific |
|
||||
dependency on version 1.2.5. So, that gets installed at [A]. Since the |
|
||||
parent installation of blerg satisfie's bar's dependency on blerg@1.x, |
|
||||
it does not install another copy under [B].</p> |
|
||||
|
|
||||
<p>Bar [B] also has dependencies on baz and asdf, so those are installed in |
|
||||
bar's <code>node_modules</code> folder. Because it depends on <code>baz@2.x</code>, it cannot |
|
||||
re-use the <code>baz@1.2.3</code> installed in the parent <code>node_modules</code> folder [D], |
|
||||
and must install its own copy [C].</p> |
|
||||
|
|
||||
<p>Underneath bar, the <code>baz->quux->bar</code> dependency creates a cycle. |
|
||||
However, because <code>bar</code> is already in <code>quux</code>'s ancestry [B], it does not |
|
||||
unpack another copy of bar into that folder.</p> |
|
||||
|
|
||||
<p>Underneath <code>foo->baz</code> [D], quux's [E] folder tree is empty, because its |
|
||||
dependency on bar is satisfied by the parent folder copy installed at [B].</p> |
|
||||
|
|
||||
<p>For a graphical breakdown of what is installed where, use <code>npm ls</code>.</p> |
|
||||
|
|
||||
<h3 id="Publishing">Publishing</h3> |
|
||||
|
|
||||
<p>Upon publishing, npm will look in the <code>node_modules</code> folder. If any of |
|
||||
the items there are not in the <code>bundledDependencies</code> array, then they will |
|
||||
not be included in the package tarball.</p> |
|
||||
|
|
||||
<p>This allows a package maintainer to install all of their dependencies |
|
||||
(and dev dependencies) locally, but only re-publish those items that |
|
||||
cannot be found elsewhere. See <code><a href="../doc/json.html">json(1)</a></code> for more information.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">global — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,72 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>home</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/docs.html">docs</a></h1> <p>Docs for a package in a web browser maybe</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm docs <pkgname> |
|
||||
npm home <pkgname></code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This command tries to guess at the likely location of a package's |
|
||||
documentation URL, and then tries to open it using the <code>--browser</code> |
|
||||
config param.</p> |
|
||||
|
|
||||
<h2 id="CONFIGURATION">CONFIGURATION</h2> |
|
||||
|
|
||||
<h3 id="browser">browser</h3> |
|
||||
|
|
||||
<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> |
|
||||
|
|
||||
<p>The browser that is called by the <code>npm docs</code> command to open websites.</p> |
|
||||
|
|
||||
<h3 id="registry">registry</h3> |
|
||||
|
|
||||
<ul><li>Default: https://registry.npmjs.org/</li><li>Type: url</li></ul> |
|
||||
|
|
||||
<p>The base URL of the npm package registry.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">home — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,93 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>ln</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/link.html">link</a></h1> <p>Symlink a package folder</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm link (in package folder) |
|
||||
npm link <pkgname></code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>Package linking is a two-step process.</p> |
|
||||
|
|
||||
<p>First, <code>npm link</code> in a package folder will create a globally-installed |
|
||||
symbolic link from <code>prefix/package-name</code> to the current folder.</p> |
|
||||
|
|
||||
<p>Next, in some other location, <code>npm link package-name</code> will create a |
|
||||
symlink from the local <code>node_modules</code> folder to the global symlink.</p> |
|
||||
|
|
||||
<p>When creating tarballs for <code>npm publish</code>, the linked packages are |
|
||||
"snapshotted" to their current state by resolving the symbolic links.</p> |
|
||||
|
|
||||
<p>This is |
|
||||
handy for installing your own stuff, so that you can work on it and test it |
|
||||
iteratively without having to continually rebuild.</p> |
|
||||
|
|
||||
<p>For example:</p> |
|
||||
|
|
||||
<pre><code>cd ~/projects/node-redis # go into the package directory |
|
||||
npm link # creates global link |
|
||||
cd ~/projects/node-bloggy # go into some other package directory. |
|
||||
npm link redis # link-install the package</code></pre> |
|
||||
|
|
||||
<p>Now, any changes to ~/projects/node-redis will be reflected in |
|
||||
~/projects/node-bloggy/node_modules/redis/</p> |
|
||||
|
|
||||
<p>You may also shortcut the two steps in one. For example, to do the |
|
||||
above use-case in a shorter way:</p> |
|
||||
|
|
||||
<pre><code>cd ~/projects/node-bloggy # go into the dir of your main project |
|
||||
npm link ../node-redis # link the dir of your dependency</code></pre> |
|
||||
|
|
||||
<p>The second line is the equivalent of doing:</p> |
|
||||
|
|
||||
<pre><code>(cd ../node-redis; npm link) |
|
||||
npm link redis</code></pre> |
|
||||
|
|
||||
<p>That is, it first creates a global link, and then links the global |
|
||||
installation target into your project's <code>node_modules</code> folder.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">ln — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,87 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>ls</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/ls.html">ls</a></h1> <p>List installed packages</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm list |
|
||||
npm ls |
|
||||
npm la |
|
||||
npm ll</code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This command will print to stdout all the versions of packages that are |
|
||||
installed, as well as their dependencies, in a tree-structure.</p> |
|
||||
|
|
||||
<p>It does not take positional arguments, though you may set config flags |
|
||||
like with any other command, such as <code>-g</code> to list global packages.</p> |
|
||||
|
|
||||
<p>It will print out extraneous, missing, and invalid packages.</p> |
|
||||
|
|
||||
<p>When run as <code>ll</code> or <code>la</code>, it shows extended information by default.</p> |
|
||||
|
|
||||
<h2 id="CONFIGURATION">CONFIGURATION</h2> |
|
||||
|
|
||||
<h3 id="long">long</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show extended information.</p> |
|
||||
|
|
||||
<h3 id="parseable">parseable</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>Show parseable output instead of tree view.</p> |
|
||||
|
|
||||
<h3 id="global">global</h3> |
|
||||
|
|
||||
<ul><li>Default: false</li><li>Type: Boolean</li></ul> |
|
||||
|
|
||||
<p>List packages in the global install prefix instead of in the current |
|
||||
project.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">ls — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,57 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html> |
|
||||
<title>rm</title> |
|
||||
<meta http-equiv="content-type" value="text/html;utf-8"> |
|
||||
<link rel="stylesheet" type="text/css" href="./style.css"> |
|
||||
|
|
||||
<body> |
|
||||
<div id="wrapper"> |
|
||||
<h1><a href="../doc/rm.html">rm</a></h1> <p>Remove a package</p> |
|
||||
|
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
||||
|
|
||||
<pre><code>npm rm <name> |
|
||||
npm uninstall <name></code></pre> |
|
||||
|
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
||||
|
|
||||
<p>This uninstalls a package, completely removing everything npm installed |
|
||||
on its behalf.</p> |
|
||||
|
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2> |
|
||||
|
|
||||
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> |
|
||||
</div> |
|
||||
<p id="footer">rm — npm@1.1.0-alpha-3</p> |
|
||||
<script> |
|
||||
;(function () { |
|
||||
var wrapper = document.getElementById("wrapper") |
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) |
|
||||
.filter(function (el) { |
|
||||
return el.parentNode === wrapper |
|
||||
&& el.tagName.match(/H[1-6]/) |
|
||||
&& el.id |
|
||||
}) |
|
||||
var l = 2 |
|
||||
, toc = document.createElement("ul") |
|
||||
toc.innerHTML = els.map(function (el) { |
|
||||
var i = el.tagName.charAt(1) |
|
||||
, out = "" |
|
||||
while (i > l) { |
|
||||
out += "<ul>" |
|
||||
l ++ |
|
||||
} |
|
||||
while (i < l) { |
|
||||
out += "</ul>" |
|
||||
l -- |
|
||||
} |
|
||||
out += "<li><a href='#" + el.id + "'>" + |
|
||||
( el.innerText || el.text || el.innerHTML) |
|
||||
+ "</a>" |
|
||||
return out |
|
||||
}).join("\n") |
|
||||
toc.id = "toc" |
|
||||
document.body.appendChild(toc) |
|
||||
})() |
|
||||
</script> |
|
||||
</body></html> |
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue