@@ -77,5 +77,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npmrc &mdash; npm@2.5.1</p>
<p id="footer">npmrc &mdash; npm@2.7.0</p>

@@ -63,7 +63,7 @@ <h2 id="bugs">bugs</h2>
issues should be reported. These are helpful for people who encounter issues
with your package.</p>
<p>It should look like this:</p>
<pre><code>{ &quot;url&quot; : &quot;http://github.com/owner/project/issues&quot;
<pre><code>{ &quot;url&quot; : &quot;https://github.com/owner/project/issues&quot;
, &quot;email&quot; : &quot;project@hostname.com&quot;
}
</code></pre><p>You can specify either one or both values. If you want to provide only a url,
@@ -161,7 +161,7 @@ <h2 id="bin">bin</h2>
<h2 id="directories">directories</h2>
<p>The CommonJS <a href="http://wiki.commonjs.org/wiki/Packages/1.0">Packages</a> spec details a
few ways that you can indicate the structure of your package using a <code>directories</code>
object. If you look at <a href="http://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
object. If you look at <a href="https://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
you&#39;ll see that it has directories for doc, lib, and man.</p>
<p>In the future, this information may be used in other creative ways.</p>
<h3 id="directories-lib">directories.lib</h3>
@@ -186,17 +186,20 @@ <h2 id="repository">repository</h2>
<p>Do it like this:</p>
<pre><code>&quot;repository&quot; :
{ &quot;type&quot; : &quot;git&quot;
, &quot;url&quot; : &quot;http://github.com/npm/npm.git&quot;
, &quot;url&quot; : &quot;https://github.com/npm/npm.git&quot;
}

&quot;repository&quot; :
{ &quot;type&quot; : &quot;svn&quot;
, &quot;url&quot; : &quot;http://v8.googlecode.com/svn/trunk/&quot;
, &quot;url&quot; : &quot;https://v8.googlecode.com/svn/trunk/&quot;
}
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
<h2 id="scripts">scripts</h2>
<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.</p>
@@ -342,12 +345,17 @@ <h2 id="peerdependencies">peerDependencies</h2>
}
}
</code></pre><p>This ensures your package <code>tea-latte</code> can be installed <em>along</em> with the second
major version of the host package <code>tea</code> only. The host package is automatically
installed if needed. <code>npm install tea-latte</code> could possibly yield the following
dependency graph:</p>
major version of the host package <code>tea</code> only. <code>npm install tea-latte</code> could
possibly yield the following dependency graph:</p>
<pre><code>├── tea-latte@1.3.5
└── tea@2.2.0
</code></pre><p>Trying to install another plugin with a conflicting requirement will cause an
</code></pre><p><strong>NOTE: npm versions 1 and 2 will automatically install <code>peerDependencies</code> if
they are not explicitly depended upon higher in the dependency tree. In the
next major version of npm (npm@3), this will no longer be the case. You will
receive a warning that the peerDependency is not installed instead.</strong> The
behavior in npms 1 &amp; 2 was frequently confusing and could easily put you into
dependency hell, a situation that npm is designed to avoid as much as possible.</p>
<p>Trying to install another plugin with a conflicting requirement will cause an
error. For this reason, make sure your plugin requirement is as broad as
possible, and not to lock it down to specific patch versions.</p>
<p>Assuming the host complies with <a href="http://semver.org/">semver</a>, only changes in
@@ -396,15 +404,15 @@ <h2 id="engines">engines</h2>
</code></pre><p>Note that, unless the user has set the <code>engine-strict</code> config flag, this
field is advisory only.</p>
<h2 id="enginestrict">engineStrict</h2>
<p><strong>NOTE: This feature is deprecated and will be removed in npm 3.0.0.</strong></p>
<p>If you are sure that your module will <em>definitely not</em> run properly on
versions of Node/npm other than those specified in the <code>engines</code> object,
then you can set <code>&quot;engineStrict&quot;: true</code> in your package.json file.
This will override the user&#39;s <code>engine-strict</code> config setting.</p>
<p>Please do not do this unless you are really very very sure. If your
engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.</p>
updating to new versions of Node. Consider this choice carefully.</p>
<h2 id="os">os</h2>
<p>You can specify which operating systems your
module will run on:</p>
@@ -488,5 +496,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">package.json &mdash; npm@2.5.1</p>
<p id="footer">package.json &mdash; npm@2.7.0</p>

@@ -56,6 +56,8 @@ <h3 id="npm-install-1-"><a href="cli/npm-install.html"><a href="cli/npm-install.
<p>Install a package</p>
<h3 id="npm-link-1-"><a href="cli/npm-link.html"><a href="cli/npm-link.html">npm-link(1)</a></a></h3>
<p>Symlink a package folder</p>
<h3 id="npm-logout-1-"><a href="cli/npm-logout.html"><a href="cli/npm-logout.html">npm-logout(1)</a></a></h3>
<p>Log out of the registry</p>
<h3 id="npm-ls-1-"><a href="cli/npm-ls.html"><a href="cli/npm-ls.html">npm-ls(1)</a></a></h3>
<p>List installed packages</p>
<h3 id="npm-outdated-1-"><a href="cli/npm-outdated.html"><a href="cli/npm-outdated.html">npm-outdated(1)</a></a></h3>
@@ -234,5 +236,5 @@ <h3 id="semver-7-"><a href="misc/semver.html"><a href="misc/semver.html">semver(
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">index &mdash; npm@2.5.1</p>
<p id="footer">index &mdash; npm@2.7.0</p>

@@ -147,5 +147,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-coding-style &mdash; npm@2.5.1</p>
<p id="footer">npm-coding-style &mdash; npm@2.7.0</p>

@@ -206,8 +206,12 @@ <h3 id="depth">depth</h3>
<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>
<p>The depth to go when recursing directories for <code>npm ls</code>,
<code>npm cache ls</code>, and <code>npm outdated</code>.</p>
<p>For <code>npm outdated</code>, a setting of <code>Infinity</code> will be treated as <code>0</code>
since that gives more useful information. To show the outdated status
of all packages and dependents, use a large integer value,
e.g., <code>npm outdated --depth 9999</code></p>
<h3 id="description">description</h3>
<ul>
<li>Default: true</li>
@@ -332,6 +336,16 @@ <h3 id="https-proxy">https-proxy</h3>
<p>A proxy to use for outgoing https requests. If the <code>HTTPS_PROXY</code> or
<code>https_proxy</code> or <code>HTTP_PROXY</code> or <code>http_proxy</code> environment variables are set,
proxy settings will be honored by the underlying <code>request</code> library.</p>
<h3 id="if-present">if-present</h3>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>If true, npm will not exit with an error code when <code>run-script</code> is invoked for
a script that isn&#39;t defined in the <code>scripts</code> section of <code>package.json</code>. This
option can be used when it&#39;s desirable to optionally run a script when it&#39;s
present and fail if the script fails. This is useful, for example, when running
scripts that may only apply for some builds in an otherwise generic CI setup.</p>
<h3 id="ignore-scripts">ignore-scripts</h3>
<ul>
<li>Default: false</li>
@@ -774,5 +788,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-config &mdash; npm@2.5.1</p>
<p id="footer">npm-config &mdash; npm@2.7.0</p>

@@ -189,5 +189,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-developers &mdash; npm@2.5.1</p>
<p id="footer">npm-developers &mdash; npm@2.7.0</p>

@@ -13,7 +13,7 @@ <h1><a href="../misc/npm-disputes.html">npm-disputes</a></h1> <p>Handling Module
<h2 id="synopsis">SYNOPSIS</h2>
<ol>
<li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
<li>Email the author, CC <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</a></li>
<li>Email the author, CC <a href="&#x6d;&#97;&#x69;&#108;&#116;&#x6f;&#x3a;&#x73;&#x75;&#x70;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#111;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#111;&#x6d;</a></li>
<li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
</ol>
<p>Don&#39;t squat on package names. Publish code or move out of the way.</p>
@@ -51,12 +51,12 @@ <h2 id="description">DESCRIPTION</h2>
owner (Bob).</li>
<li>Joe emails Bob, explaining the situation <strong>as respectfully as
possible</strong>, and what he would like to do with the module name. He
adds the npm support staff <a href="&#109;&#x61;&#105;&#108;&#x74;&#111;&#x3a;&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;</a> to the CC list of
adds the npm support staff <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#111;&#58;&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#111;&#x6d;">&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#111;&#x6d;</a> to the CC list of
the email. Mention in the email that Bob can run <code>npm owner add
joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
<li>After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can&#39;t come to any sort of resolution, email support
<a href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#x3a;&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
<a href="&#109;&#x61;&#x69;&#108;&#116;&#111;&#58;&#x73;&#117;&#112;&#x70;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#117;&#112;&#x70;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
usually at least 4 weeks, but extra time is allowed around common
holidays.)</li>
</ol>
@@ -112,5 +112,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-disputes &mdash; npm@2.5.1</p>
<p id="footer">npm-disputes &mdash; npm@2.7.0</p>

@@ -236,7 +236,7 @@ <h2 id="i-get-econnrefused-a-lot-what-s-up-">I get ECONNREFUSED a lot. What&#39
<p>To check if the registry is down, open up
<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser. This will also tell
you if you are just unable to access the internet for some reason.</p>
<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</a>
<p>If the registry IS down, let us know by emailing <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;">&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;</a>
or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>. If it&#39;s
down for the world (and not just on your local network) then we&#39;re
probably already being pinged about it.</p>
@@ -307,5 +307,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-faq &mdash; npm@2.5.1</p>
<p id="footer">npm-faq &mdash; npm@2.7.0</p>

@@ -56,6 +56,8 @@ <h3 id="npm-install-1-"><a href="../cli/npm-install.html"><a href="../cli/npm-in
<p>Install a package</p>
<h3 id="npm-link-1-"><a href="../cli/npm-link.html"><a href="../cli/npm-link.html">npm-link(1)</a></a></h3>
<p>Symlink a package folder</p>
<h3 id="npm-logout-1-"><a href="../cli/npm-logout.html"><a href="../cli/npm-logout.html">npm-logout(1)</a></a></h3>
<p>Log out of the registry</p>
<h3 id="npm-ls-1-"><a href="../cli/npm-ls.html"><a href="../cli/npm-ls.html">npm-ls(1)</a></a></h3>
<p>List installed packages</p>
<h3 id="npm-outdated-1-"><a href="../cli/npm-outdated.html"><a href="../cli/npm-outdated.html">npm-outdated(1)</a></a></h3>
@@ -234,5 +236,5 @@ <h3 id="semver-7-"><a href="../misc/semver.html"><a href="../misc/semver.html">s
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-index &mdash; npm@2.5.1</p>
<p id="footer">npm-index &mdash; npm@2.7.0</p>

@@ -70,5 +70,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-registry &mdash; npm@2.5.1</p>
<p id="footer">npm-registry &mdash; npm@2.7.0</p>

@@ -78,5 +78,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-scope &mdash; npm@2.5.1</p>
<p id="footer">npm-scope &mdash; npm@2.7.0</p>

@@ -41,41 +41,23 @@ <h2 id="description">DESCRIPTION</h2>
run-script &lt;pkg&gt; &lt;stage&gt;</code>. <em>Pre</em> and <em>post</em> commands with matching
names will be run for those as well (e.g. <code>premyscript</code>, <code>myscript</code>,
<code>postmyscript</code>).</p>
<h2 id="note-install-scripts-are-an-antipattern">NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN</h2>
<p><strong>tl;dr</strong> Don&#39;t use <code>install</code>. Use a <code>.gyp</code> file for compilation, and
<code>prepublish</code> for anything else.</p>
<p>You should almost never have to explicitly set a <code>preinstall</code> or
<code>install</code> script. If you are doing this, please consider if there is
another option.</p>
<p>The only valid use of <code>install</code> or <code>preinstall</code> scripts is for
compilation which must be done on the target architecture. In early
versions of node, this was often done using the <code>node-waf</code> scripts, or
a standalone <code>Makefile</code>, and early versions of npm required that it be
explicitly set in package.json. This was not portable, and harder to
do properly.</p>
<p>In the current version of node, the standard way to do this is using a
<code>.gyp</code> file. If you have a file with a <code>.gyp</code> extension in the root
of your package, then npm will run the appropriate <code>node-gyp</code> commands
automatically at install time. This is the only officially supported
method for compiling binary addons, and does not require that you add
anything to your package.json file.</p>
<p>If you have to do other things before your package is used, in a way
<h2 id="common-uses">COMMON USES</h2>
<p>If you need to perform operations on your package before it is used, in a way
that is not dependent on the operating system or architecture of the
target system, then use a <code>prepublish</code> script instead. This includes
target system, use a <code>prepublish</code> script. This includes
tasks such as:</p>
<ul>
<li>Compile CoffeeScript source code into JavaScript.</li>
<li>Create minified versions of JavaScript source code.</li>
<li>Compiling CoffeeScript source code into JavaScript.</li>
<li>Creating minified versions of JavaScript source code.</li>
<li>Fetching remote resources that your package will use.</li>
</ul>
<p>The advantage of doing these things at <code>prepublish</code> time instead of
<code>preinstall</code> or <code>install</code> time is that they can be done once, in a
single place, and thus greatly reduce complexity and variability.
<p>The advantage of doing these things at <code>prepublish</code> time is that they can be done once, in a
single place, thus reducing complexity and variability.
Additionally, this means that:</p>
<ul>
<li>You can depend on <code>coffee-script</code> as a <code>devDependency</code>, and thus
your users don&#39;t need to have it installed.</li>
<li>You don&#39;t need to include the minifiers in your package, reducing
<li>You don&#39;t need to include minifiers in your package, reducing
the size for your users.</li>
<li>You don&#39;t need to rely on your users having <code>curl</code> or <code>wget</code> or
other system tools on the target machines.</li>
@@ -196,6 +178,11 @@ <h2 id="best-practices">BEST PRACTICES</h2>
<li>Don&#39;t prefix your script commands with &quot;sudo&quot;. If root permissions
are required for some reason, then it&#39;ll fail with that error, and
the user will sudo the npm command in question.</li>
<li>Don&#39;t use <code>install</code>. Use a <code>.gyp</code> file for compilation, and <code>prepublish</code>
for anything else. You should almost never have to explicitly set a
preinstall or install script. If you are doing this, please consider if
there is another option. The only valid use of <code>install</code> or <code>preinstall</code>
scripts is for compilation which must be done on the target architecture.</li>
</ul>
<h2 id="see-also">SEE ALSO</h2>
<ul>
@@ -216,5 +203,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-scripts &mdash; npm@2.5.1</p>
<p id="footer">npm-scripts &mdash; npm@2.7.0</p>

@@ -57,5 +57,5 @@ <h2 id="see-also">SEE ALSO</h2>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">removing-npm &mdash; npm@2.5.1</p>
<p id="footer">removing-npm &mdash; npm@2.7.0</p>

@@ -94,7 +94,7 @@ <h3 id="prerelease-tags">Prerelease Tags</h3>
<h4 id="prerelease-identifiers">Prerelease Identifiers</h4>
<p>The method <code>.inc</code> takes an additional <code>identifier</code> string argument that
will append the value of the string as a prerelease identifier:</p>
<pre><code class="lang-`javascript">&gt; semver.inc(&#39;1.2.3&#39;, &#39;pre&#39;, &#39;beta&#39;)
<pre><code class="lang-javascript">&gt; semver.inc(&#39;1.2.3&#39;, &#39;pre&#39;, &#39;beta&#39;)
&#39;1.2.4-beta.0&#39;
</code></pre>
<p>command-line example:</p>
@@ -219,6 +219,9 @@ <h2 id="functions">Functions</h2>
increments it.</li>
</ul>
</li>
<li><code>major(v)</code>: Return the major version number.</li>
<li><code>minor(v)</code>: Return the minor version number.</li>
<li><code>patch(v)</code>: Return the patch version number.</li>
</ul>
<h3 id="comparison">Comparison</h3>
<ul>
@@ -279,5 +282,5 @@ <h3 id="ranges">Ranges</h3>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">semver &mdash; npm@2.5.1</p>
<p id="footer">semver &mdash; npm@2.7.0</p>

@@ -109,13 +109,13 @@ <h2 id="legal-stuff">Legal Stuff</h2>
npm, Inc. or the Node.js project.</p>
<p>Data published to the npm registry is not part of npm itself, and is
the sole property of the publisher. While every effort is made to
ensure accountability, there is absolutely no guarantee, warrantee, or
ensure accountability, there is absolutely no guarantee, warranty, or
assertion expressed or implied as to the quality, fitness for a
specific purpose, or lack of malice in any given npm package.</p>
<p>If you have a complaint about a package in the public npm registry,
and cannot <a href="https://docs.npmjs.com/misc/disputes">resolve it with the package
owner</a>, please email
<a href="&#109;&#97;&#x69;&#108;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#x6f;&#x6d;">&#x73;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#x6f;&#x6d;</a> and explain the situation.</p>
<a href="&#109;&#97;&#105;&#108;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;">&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;</a> and explain the situation.</p>
<p>Any data published to The npm Registry (including user account
information) may be removed or modified at the sole discretion of the
npm server administrators.</p>
@@ -2,6 +2,12 @@ <h1><a href="../api/npm-update.html">npm-update</a></h1> <p>Update a package</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm.commands.update(packages, callback)
</code></pre><h1 id="description">DESCRIPTION</h1>
<p>Updates a package, upgrading it to the latest version. It also installs any missing packages.</p>
<p>The &#39;packages&#39; argument is an array of packages to update. The &#39;callback&#39; parameter will be called when done or when an error occurs.</p>
<p>Updates a package, upgrading it to the latest version. It also installs any
missing packages.</p>
<p>The <code>packages</code> argument is an array of packages to update. The <code>callback</code>
parameter will be called when done or when an error occurs.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-update.html">npm-update(1)</a></li>
</ul>

@@ -12,7 +12,7 @@ <h2 id="synopsis">SYNOPSIS</h2>
npm.commands.install([&quot;package&quot;], cb)
})
</code></pre><h2 id="version">VERSION</h2>
<p>2.5.1</p>
<p>2.7.0</p>
<h2 id="description">DESCRIPTION</h2>
<p>This is the API documentation for npm.
To find documentation of the command line
@@ -15,7 +15,7 @@ <h2 id="synopsis">SYNOPSIS</h2>
</li>
<li><p>ls:
Show all of the dist-tags for a package, defaulting to the package in
the curren prefix.</p>
the current prefix.</p>
</li>
</ul>
<p>A tag can be used when installing packages as a reference to a version instead
@@ -11,10 +11,18 @@ <h2 id="synopsis">SYNOPSIS</h2>
without a really good reason to do so.</p>
<p>If you invoke it with <code>-f</code>, <code>--force</code>, <code>-y</code>, or <code>--yes</code>, it will use only
defaults and not prompt you for any options.</p>
<h2 id="configuration">CONFIGURATION</h2>
<h3 id="scope">scope</h3>
<ul>
<li>Default: none</li>
<li>Type: String</li>
</ul>
<p>The scope under which the new module should be created.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li>
<li><a href="../files/package.json.html">package.json(5)</a></li>
<li><a href="../cli/npm-version.html">npm-version(1)</a></li>
<li><a href="../misc/npm-scope.html">npm-scope(7)</a></li>
</ul>

@@ -33,9 +33,10 @@ <h2 id="synopsis">SYNOPSIS</h2>
<p> In global mode (ie, with <code>-g</code> or <code>--global</code> appended to the command),
it installs the current package context (ie, the current working
directory) as a global package.</p>
<p> By default, <code>npm install</code> will install all modules listed as
dependencies. With the <code>--production</code> flag,
npm will not install modules listed in <code>devDependencies</code>.</p>
<p> By default, <code>npm install</code> will install all modules listed as dependencies.
With the <code>--production</code> flag (or when the <code>NODE_ENV</code> environment variable
is set to <code>production</code>), npm will not install modules listed in
<code>devDependencies</code>.</p>
</li>
<li><p><code>npm install &lt;folder&gt;</code>:</p>
<p> Install a package that is sitting in a folder on the filesystem.</p>
@@ -24,14 +24,14 @@ <h2 id="synopsis">SYNOPSIS</h2>
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>
~/projects/node-bloggy/node_modules/node-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
npm link node-redis
</code></pre><p>That is, it first creates a global link, and then links the global
installation target into your project&#39;s <code>node_modules</code> folder.</p>
<p>If your linked package is scoped (see <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>) your link command must
@@ -0,0 +1,35 @@
<h1><a href="../cli/npm-logout.html">npm-logout</a></h1> <p>Log out of the registry</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm logout [--registry=url] [--scope=@orgname]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>When logged into a registry that supports token-based authentication, tell the
server to end this token&#39;s session. This will invalidate the token everywhere
you&#39;re using it, not just for the current environment.</p>
<p>When logged into a legacy registry that uses username and password authentication, this will
clear the credentials in your user configuration. In this case, it will <em>only</em> affect
the current environment.</p>
<p>If <code>--scope</code> is provided, this will find the credentials for the registry
connected to that scope, if set.</p>
<h2 id="configuration">CONFIGURATION</h2>
<h3 id="registry">registry</h3>
<p>Default: <a href="http://registry.npmjs.org/">http://registry.npmjs.org/</a></p>
<p>The base URL of the npm package registry. If <code>scope</code> is also specified,
it takes precedence.</p>
<h3 id="scope">scope</h3>
<p>Default: none</p>
<p>If specified, the user and login credentials given will be associated
with the specified scope. See <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>. You can use both at the same time,
e.g.</p>
<pre><code>npm adduser --registry=http://myregistry.example.com --scope=@myco
</code></pre><p>This will set a registry for the given scope and login or create a user for
that registry at the same time.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li>
<li><a href="../misc/npm-registry.html">npm-registry(7)</a></li>
<li><a href="../cli/npm-config.html">npm-config(1)</a></li>
<li><a href="../misc/npm-config.html">npm-config(7)</a></li>
<li><a href="../files/npmrc.html">npmrc(5)</a></li>
<li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li>
</ul>

@@ -11,7 +11,7 @@ <h2 id="synopsis">SYNOPSIS</h2>
limit the results to only the paths to the packages named. Note that
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm&#39;s source tree will show:</p>
<pre><code>npm@2.5.1 /path/to/npm
<pre><code>npm@2.7.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
@@ -50,6 +50,18 @@ <h3 id="depth">depth</h3>
<li>Type: Int</li>
</ul>
<p>Max display depth of the dependency tree.</p>
<h3 id="prod-production">prod / production</h3>
<ul>
<li>Type: Boolean</li>
<li>Default: false</li>
</ul>
<p>Display only the dependency tree for packages in <code>dependencies</code>.</p>
<h3 id="dev">dev</h3>
<ul>
<li>Type: Boolean</li>
<li>Default: false</li>
</ul>
<p>Display only the dependency tree for packages in <code>devDependencies</code>.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-config.html">npm-config(1)</a></li>
@@ -3,22 +3,22 @@ <h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm run-script [command] [-- &lt;args&gt;]
npm run [command] [-- &lt;args&gt;]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This runs an arbitrary command from a package&#39;s <code>&quot;scripts&quot;</code> object.
If no package name is provided, it will search for a <code>package.json</code>
in the current folder and use its <code>&quot;scripts&quot;</code> object. If no <code>&quot;command&quot;</code>
is provided, it will list the available top level scripts. The <code>env</code> command
can be used to list environment variables that will be available to the script
at runtime. If an &quot;env&quot; command is defined in your package it will have
precedence instead.</p>
<p><code>run[-script]</code> is used by the test, start, restart, and stop commands, but can
be called directly, as well.</p>
<p>This runs an arbitrary command from a package&#39;s <code>&quot;scripts&quot;</code> object. If no
<code>&quot;command&quot;</code> is provided, it will list the available scripts. <code>run[-script]</code> is
used by the test, start, restart, and stop commands, but can be called
directly, as well. When the scripts in the package are printed out, they&#39;re
separated into lifecycle (test, start, restart) and directly-run scripts.</p>
<p>As of <a href="http://blog.npmjs.org/post/98131109725/npm-2-0-0"><code>npm@2.0.0</code></a>, you can
use custom arguments when executing scripts. The special option <code>--</code> is used by
<a href="http://goo.gl/KxMmtG">getopt</a> to delimit the end of the options. npm will pass
all the arguments after the <code>--</code> directly to your script:</p>
<pre><code>npm run test -- --grep=&quot;pattern&quot;
</code></pre><p>The arguments will only be passed to the script specified after <code>npm run</code>
and not to any pre or post script.</p>
<p>The <code>env</code> script is a special built-in command that can be used to list
environment variables that will be available to the script at runtime. If an
&quot;env&quot; command is defined in your package it will take precedence over the
built-in.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li>
@@ -3,18 +3,95 @@ <h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm update [-g] [&lt;name&gt; [&lt;name&gt; ...]]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command will update all the packages listed to the latest version
(specified by the <code>tag</code> config).</p>
(specified by the <code>tag</code> config), respecting semver.</p>
<p>It will also install missing packages. As with all commands that install
packages, the <code>--dev</code> flag will cause <code>devDependencies</code> to be processed
as well.</p>
<p>If the <code>-g</code> flag is specified, this command will update globally installed
packages.</p>
<p>If no package name is specified, all packages in the specified location (global
or local) will be updated.</p>
<p>As of <code>npm@2.6.1</code>, the <code>npm update</code> will only inspect top-level packages.
Prior versions of <code>npm</code> would also recursively inspect all dependencies.
To get the old behavior, use <code>npm --depth 9999 update</code>, but be warned that
simultaneous asynchronous update of all packages, including <code>npm</code> itself
and packages that <code>npm</code> depends on, often causes problems up to and including
the uninstallation of <code>npm</code> itself.</p>
<p>To restore a missing <code>npm</code>, use the command:</p>
<pre><code>curl -L https://npmjs.com/install.sh | sh
</code></pre><h2 id="examples">EXAMPLES</h2>
<p>IMPORTANT VERSION NOTE: these examples assume <code>npm@2.6.1</code> or later. For
older versions of <code>npm</code>, you must specify <code>--depth 0</code> to get the behavior
described below.</p>
<p>For the examples below, assume that the current package is <code>app</code> and it depends
on dependencies, <code>dep1</code> (<code>dep2</code>, .. etc.). The published versions of <code>dep1</code> are:</p>
<pre><code>{
dist-tags: { latest: &quot;1.2.2&quot; },
versions: { &quot;1.2.2&quot;,
&quot;1.2.1&quot;,
&quot;1.2.0&quot;,
&quot;1.1.2&quot;,
&quot;1.1.1&quot;,
&quot;1.0.0&quot;,
&quot;0.4.1&quot;,
&quot;0.4.0&quot;,
&quot;0.2.0&quot;
}
}
</code></pre><h3 id="caret-dependencies">Caret Dependencies</h3>
<p>If <code>app</code>&#39;s <code>package.json</code> contains:</p>
<pre><code>dependencies: {
dep1: &quot;^1.1.1&quot;
}
</code></pre><p>Then <code>npm update</code> will install <code>dep1@1.2.2</code>, because <code>1.2.2</code> is <code>latest</code> and
<code>1.2.2</code> satisfies <code>^1.1.1</code>.</p>
<h3 id="tilde-dependencies">Tilde Dependencies</h3>
<p>However, if <code>app</code>&#39;s <code>package.json</code> contains:</p>
<pre><code>dependencies: {
dep1: &quot;~1.1.1&quot;
}
</code></pre><p>In this case, running <code>npm update</code> will install <code>dep1@1.1.2</code>. Even though the <code>latest</code>
tag points to <code>1.2.2</code>, this version does not satisfy <code>~1.1.1</code>, which is equivalent
to <code>&gt;=1.1.1 &lt;1.2.0</code>. So the highest-sorting version that satisfies <code>~1.1.1</code> is used,
which is <code>1.1.2</code>.</p>
<h3 id="caret-dependencies-below-1-0-0">Caret Dependencies below 1.0.0</h3>
<p>Suppose <code>app</code> has a caret dependency on a version below <code>1.0.0</code>, for example:</p>
<pre><code>dependencies: {
dep1: &quot;^0.2.0&quot;
}
</code></pre><p><code>npm update</code> will install <code>dep1@0.2.0</code>, because there are no other
versions which satisfy <code>^0.2.0</code>.</p>
<p>If the dependence were on <code>^0.4.0</code>:</p>
<pre><code>dependencies: {
dep1: &quot;^0.4.0&quot;
}
</code></pre><p>Then <code>npm update</code> will install <code>dep1@0.4.1</code>, because that is the highest-sorting
version that satisfies <code>^0.4.0</code> (<code>&gt;= 0.4.0 &lt;0.5.0</code>)</p>
<h3 id="recording-updates-with-save-">Recording Updates with <code>--save</code></h3>
<p>When you want to update a package and save the new version as
the minimum required dependency in <code>package.json</code>, you can use
<code>npm update --save</code>. For example if <code>package.json</code> contains</p>
<pre><code>dependencies: {
dep1: &quot;^1.1.1&quot;
}
</code></pre><p>Then <code>npm update --save</code> will install <code>dep1@1.2.2</code> (i.e., <code>latest</code>),
and <code>package.json</code> will be modified:</p>
<pre><code>dependencies: {
dep1: &quot;^1.2.2&quot;
}
</code></pre><p>Note that <code>npm</code> will only write an updated version to <code>package.json</code>
if it installs a new package.</p>
<h3 id="updating-globally-installed-packages">Updating Globally-Installed Packages</h3>
<p><code>npm update -g</code> will apply the <code>update</code> action to each globally- installed
package that is <code>outdated</code> -- that is, has a version that is different from
<code>latest</code>.</p>
<p>NOTE: If a package has been upgraded to a version newer than <code>latest</code>, it will
be <em>downgraded</em>.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-install.html">npm-install(1)</a></li>
<li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li>
<li><a href="../cli/npm-shrinkwrap.html">npm-shrinkwrap(1)</a></li>
<li><a href="../misc/npm-registry.html">npm-registry(7)</a></li>
<li><a href="../files/npm-folders.html">npm-folders(5)</a></li>
<li><a href="../cli/npm-ls.html">npm-ls(1)</a></li>
@@ -8,8 +8,10 @@ <h2 id="synopsis">SYNOPSIS</h2>
valid second argument to semver.inc (one of &quot;patch&quot;, &quot;minor&quot;, &quot;major&quot;,
&quot;prepatch&quot;, &quot;preminor&quot;, &quot;premajor&quot;, &quot;prerelease&quot;). In the second case,
the existing version will be incremented by 1 in the specified field.</p>
<p>If run in a git repo, it will also create a version commit and tag, and
fail if the repo is not clean.</p>
<p>If run in a git repo, it will also create a version commit and tag, and fail if
the repo is not clean. This behavior is controlled by <code>git-tag-version</code> (see
below), and can be disabled on the command line by running <code>npm
--no-git-tag-version version</code></p>
<p>If supplied with <code>--message</code> (shorthand: <code>-m</code>) config option, npm will
use it as a commit message when creating a version commit. If the
<code>message</code> config contains <code>%s</code> then that will be replaced with the
@@ -26,10 +28,18 @@ <h2 id="synopsis">SYNOPSIS</h2>
2048-bit RSA key, ID 6C481CF6, created 2010-08-31

Enter passphrase:
</code></pre><h2 id="see-also">SEE ALSO</h2>
</code></pre><h2 id="configuration">CONFIGURATION</h2>
<h3 id="git-tag-version">git-tag-version</h3>
<ul>
<li>Default: true</li>
<li>Type: Boolean</li>
</ul>
<p>Commit and tag the version change.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-init.html">npm-init(1)</a></li>
<li><a href="../files/package.json.html">package.json(5)</a></li>
<li><a href="../misc/semver.html">semver(7)</a></li>
<li><a href="../misc/config.html">config(7)</a></li>
</ul>

@@ -2,7 +2,7 @@ <h1><a href="../cli/npm.html">npm</a></h1> <p>javascript package manager</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm &lt;command&gt; [args]
</code></pre><h2 id="version">VERSION</h2>
<p>2.5.1</p>
<p>2.7.0</p>
<h2 id="description">DESCRIPTION</h2>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -99,15 +99,15 @@ <h2 id="contributions">CONTRIBUTIONS</h2>
the issues list or ask on the mailing list.</p>
<ul>
<li><a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
<li><a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#x3a;&#x6e;&#x70;&#109;&#x2d;&#64;&#103;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#x73;&#46;&#99;&#111;&#x6d;">&#x6e;&#x70;&#109;&#x2d;&#64;&#103;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#x73;&#46;&#99;&#111;&#x6d;</a></li>
<li><a href="&#109;&#97;&#105;&#x6c;&#116;&#x6f;&#58;&#110;&#x70;&#109;&#45;&#64;&#x67;&#x6f;&#111;&#x67;&#x6c;&#101;&#x67;&#114;&#111;&#117;&#112;&#115;&#46;&#99;&#111;&#x6d;">&#110;&#x70;&#109;&#45;&#64;&#x67;&#x6f;&#111;&#x67;&#x6c;&#101;&#x67;&#114;&#111;&#117;&#112;&#115;&#46;&#99;&#111;&#x6d;</a></li>
</ul>
<h2 id="bugs">BUGS</h2>
<p>When you find issues, please report them:</p>
<ul>
<li>web:
<a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
<li>email:
<a href="&#x6d;&#x61;&#x69;&#108;&#116;&#111;&#58;&#x6e;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#103;&#x72;&#111;&#x75;&#112;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#x6e;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#103;&#x72;&#111;&#x75;&#112;&#x73;&#x2e;&#x63;&#111;&#x6d;</a></li>
<a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#x3a;&#x6e;&#112;&#x6d;&#45;&#64;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#x67;&#114;&#111;&#x75;&#112;&#115;&#x2e;&#x63;&#x6f;&#109;">&#x6e;&#112;&#x6d;&#45;&#64;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#x67;&#114;&#111;&#x75;&#112;&#115;&#x2e;&#x63;&#x6f;&#109;</a></li>
</ul>
<p>Be sure to include <em>all</em> of the output from the npm command that didn&#39;t work
as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p>
@@ -117,7 +117,7 @@ <h2 id="author">AUTHOR</h2>
<p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
<a href="https://github.com/isaacs/">isaacs</a> ::
<a href="http://twitter.com/izs">@izs</a> ::
<a href="&#109;&#x61;&#x69;&#108;&#116;&#111;&#58;&#105;&#64;&#105;&#122;&#x73;&#x2e;&#x6d;&#x65;">&#105;&#64;&#105;&#122;&#x73;&#x2e;&#x6d;&#x65;</a></p>
<a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#111;&#58;&#x69;&#x40;&#x69;&#122;&#115;&#x2e;&#x6d;&#101;">&#x69;&#x40;&#x69;&#122;&#115;&#x2e;&#x6d;&#101;</a></p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-help.html">npm-help(1)</a></li>
@@ -52,7 +52,7 @@ <h2 id="bugs">bugs</h2>
issues should be reported. These are helpful for people who encounter issues
with your package.</p>
<p>It should look like this:</p>
<pre><code>{ &quot;url&quot; : &quot;http://github.com/owner/project/issues&quot;
<pre><code>{ &quot;url&quot; : &quot;https://github.com/owner/project/issues&quot;
, &quot;email&quot; : &quot;project@hostname.com&quot;
}
</code></pre><p>You can specify either one or both values. If you want to provide only a url,
@@ -150,7 +150,7 @@ <h2 id="bin">bin</h2>
<h2 id="directories">directories</h2>
<p>The CommonJS <a href="http://wiki.commonjs.org/wiki/Packages/1.0">Packages</a> spec details a
few ways that you can indicate the structure of your package using a <code>directories</code>
object. If you look at <a href="http://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
object. If you look at <a href="https://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
you&#39;ll see that it has directories for doc, lib, and man.</p>
<p>In the future, this information may be used in other creative ways.</p>
<h3 id="directories-lib">directories.lib</h3>
@@ -175,17 +175,20 @@ <h2 id="repository">repository</h2>
<p>Do it like this:</p>
<pre><code>&quot;repository&quot; :
{ &quot;type&quot; : &quot;git&quot;
, &quot;url&quot; : &quot;http://github.com/npm/npm.git&quot;
, &quot;url&quot; : &quot;https://github.com/npm/npm.git&quot;
}

&quot;repository&quot; :
{ &quot;type&quot; : &quot;svn&quot;
, &quot;url&quot; : &quot;http://v8.googlecode.com/svn/trunk/&quot;
, &quot;url&quot; : &quot;https://v8.googlecode.com/svn/trunk/&quot;
}
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
<h2 id="scripts">scripts</h2>
<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.</p>
@@ -331,12 +334,17 @@ <h2 id="peerdependencies">peerDependencies</h2>
}
}
</code></pre><p>This ensures your package <code>tea-latte</code> can be installed <em>along</em> with the second
major version of the host package <code>tea</code> only. The host package is automatically
installed if needed. <code>npm install tea-latte</code> could possibly yield the following
dependency graph:</p>
major version of the host package <code>tea</code> only. <code>npm install tea-latte</code> could
possibly yield the following dependency graph:</p>
<pre><code>├── tea-latte@1.3.5
└── tea@2.2.0
</code></pre><p>Trying to install another plugin with a conflicting requirement will cause an
</code></pre><p><strong>NOTE: npm versions 1 and 2 will automatically install <code>peerDependencies</code> if
they are not explicitly depended upon higher in the dependency tree. In the
next major version of npm (npm@3), this will no longer be the case. You will
receive a warning that the peerDependency is not installed instead.</strong> The
behavior in npms 1 &amp; 2 was frequently confusing and could easily put you into
dependency hell, a situation that npm is designed to avoid as much as possible.</p>
<p>Trying to install another plugin with a conflicting requirement will cause an
error. For this reason, make sure your plugin requirement is as broad as
possible, and not to lock it down to specific patch versions.</p>
<p>Assuming the host complies with <a href="http://semver.org/">semver</a>, only changes in
@@ -385,15 +393,15 @@ <h2 id="engines">engines</h2>
</code></pre><p>Note that, unless the user has set the <code>engine-strict</code> config flag, this
field is advisory only.</p>
<h2 id="enginestrict">engineStrict</h2>
<p><strong>NOTE: This feature is deprecated and will be removed in npm 3.0.0.</strong></p>
<p>If you are sure that your module will <em>definitely not</em> run properly on
versions of Node/npm other than those specified in the <code>engines</code> object,
then you can set <code>&quot;engineStrict&quot;: true</code> in your package.json file.
This will override the user&#39;s <code>engine-strict</code> config setting.</p>
<p>Please do not do this unless you are really very very sure. If your
engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.</p>
updating to new versions of Node. Consider this choice carefully.</p>
<h2 id="os">os</h2>
<p>You can specify which operating systems your
module will run on:</p>
@@ -52,7 +52,7 @@ <h2 id="bugs">bugs</h2>
issues should be reported. These are helpful for people who encounter issues
with your package.</p>
<p>It should look like this:</p>
<pre><code>{ &quot;url&quot; : &quot;http://github.com/owner/project/issues&quot;
<pre><code>{ &quot;url&quot; : &quot;https://github.com/owner/project/issues&quot;
, &quot;email&quot; : &quot;project@hostname.com&quot;
}
</code></pre><p>You can specify either one or both values. If you want to provide only a url,
@@ -150,7 +150,7 @@ <h2 id="bin">bin</h2>
<h2 id="directories">directories</h2>
<p>The CommonJS <a href="http://wiki.commonjs.org/wiki/Packages/1.0">Packages</a> spec details a
few ways that you can indicate the structure of your package using a <code>directories</code>
object. If you look at <a href="http://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
object. If you look at <a href="https://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
you&#39;ll see that it has directories for doc, lib, and man.</p>
<p>In the future, this information may be used in other creative ways.</p>
<h3 id="directories-lib">directories.lib</h3>
@@ -175,17 +175,20 @@ <h2 id="repository">repository</h2>
<p>Do it like this:</p>
<pre><code>&quot;repository&quot; :
{ &quot;type&quot; : &quot;git&quot;
, &quot;url&quot; : &quot;http://github.com/npm/npm.git&quot;
, &quot;url&quot; : &quot;https://github.com/npm/npm.git&quot;
}

&quot;repository&quot; :
{ &quot;type&quot; : &quot;svn&quot;
, &quot;url&quot; : &quot;http://v8.googlecode.com/svn/trunk/&quot;
, &quot;url&quot; : &quot;https://v8.googlecode.com/svn/trunk/&quot;
}
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
<h2 id="scripts">scripts</h2>
<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.</p>
@@ -331,12 +334,17 @@ <h2 id="peerdependencies">peerDependencies</h2>
}
}
</code></pre><p>This ensures your package <code>tea-latte</code> can be installed <em>along</em> with the second
major version of the host package <code>tea</code> only. The host package is automatically
installed if needed. <code>npm install tea-latte</code> could possibly yield the following
dependency graph:</p>
major version of the host package <code>tea</code> only. <code>npm install tea-latte</code> could
possibly yield the following dependency graph:</p>
<pre><code>├── tea-latte@1.3.5
└── tea@2.2.0
</code></pre><p>Trying to install another plugin with a conflicting requirement will cause an
</code></pre><p><strong>NOTE: npm versions 1 and 2 will automatically install <code>peerDependencies</code> if
they are not explicitly depended upon higher in the dependency tree. In the
next major version of npm (npm@3), this will no longer be the case. You will
receive a warning that the peerDependency is not installed instead.</strong> The
behavior in npms 1 &amp; 2 was frequently confusing and could easily put you into
dependency hell, a situation that npm is designed to avoid as much as possible.</p>
<p>Trying to install another plugin with a conflicting requirement will cause an
error. For this reason, make sure your plugin requirement is as broad as
possible, and not to lock it down to specific patch versions.</p>
<p>Assuming the host complies with <a href="http://semver.org/">semver</a>, only changes in
@@ -385,15 +393,15 @@ <h2 id="engines">engines</h2>
</code></pre><p>Note that, unless the user has set the <code>engine-strict</code> config flag, this
field is advisory only.</p>
<h2 id="enginestrict">engineStrict</h2>
<p><strong>NOTE: This feature is deprecated and will be removed in npm 3.0.0.</strong></p>
<p>If you are sure that your module will <em>definitely not</em> run properly on
versions of Node/npm other than those specified in the <code>engines</code> object,
then you can set <code>&quot;engineStrict&quot;: true</code> in your package.json file.
This will override the user&#39;s <code>engine-strict</code> config setting.</p>
<p>Please do not do this unless you are really very very sure. If your
engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.</p>
updating to new versions of Node. Consider this choice carefully.</p>
<h2 id="os">os</h2>
<p>You can specify which operating systems your
module will run on:</p>
@@ -45,6 +45,8 @@ <h3 id="npm-install-1-"><a href="cli/npm-install.html">npm-install(1)</a></h3>
<p>Install a package</p>
<h3 id="npm-link-1-"><a href="cli/npm-link.html">npm-link(1)</a></h3>
<p>Symlink a package folder</p>
<h3 id="npm-logout-1-"><a href="cli/npm-logout.html">npm-logout(1)</a></h3>
<p>Log out of the registry</p>
<h3 id="npm-ls-1-"><a href="cli/npm-ls.html">npm-ls(1)</a></h3>
<p>List installed packages</p>
<h3 id="npm-outdated-1-"><a href="cli/npm-outdated.html">npm-outdated(1)</a></h3>
@@ -195,8 +195,12 @@ <h3 id="depth">depth</h3>
<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>
<p>The depth to go when recursing directories for <code>npm ls</code>,
<code>npm cache ls</code>, and <code>npm outdated</code>.</p>
<p>For <code>npm outdated</code>, a setting of <code>Infinity</code> will be treated as <code>0</code>
since that gives more useful information. To show the outdated status
of all packages and dependents, use a large integer value,
e.g., <code>npm outdated --depth 9999</code></p>
<h3 id="description">description</h3>
<ul>
<li>Default: true</li>
@@ -321,6 +325,16 @@ <h3 id="https-proxy">https-proxy</h3>
<p>A proxy to use for outgoing https requests. If the <code>HTTPS_PROXY</code> or
<code>https_proxy</code> or <code>HTTP_PROXY</code> or <code>http_proxy</code> environment variables are set,
proxy settings will be honored by the underlying <code>request</code> library.</p>
<h3 id="if-present">if-present</h3>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>If true, npm will not exit with an error code when <code>run-script</code> is invoked for
a script that isn&#39;t defined in the <code>scripts</code> section of <code>package.json</code>. This
option can be used when it&#39;s desirable to optionally run a script when it&#39;s
present and fail if the script fails. This is useful, for example, when running
scripts that may only apply for some builds in an otherwise generic CI setup.</p>
<h3 id="ignore-scripts">ignore-scripts</h3>
<ul>
<li>Default: false</li>
@@ -2,7 +2,7 @@ <h1><a href="../misc/npm-disputes.html">npm-disputes</a></h1> <p>Handling Module
<h2 id="synopsis">SYNOPSIS</h2>
<ol>
<li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
<li>Email the author, CC <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</a></li>
<li>Email the author, CC <a href="&#x6d;&#97;&#x69;&#108;&#116;&#x6f;&#x3a;&#x73;&#x75;&#x70;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#111;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#111;&#x6d;</a></li>
<li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
</ol>
<p>Don&#39;t squat on package names. Publish code or move out of the way.</p>
@@ -40,12 +40,12 @@ <h2 id="description">DESCRIPTION</h2>
owner (Bob).</li>
<li>Joe emails Bob, explaining the situation <strong>as respectfully as
possible</strong>, and what he would like to do with the module name. He
adds the npm support staff <a href="&#109;&#x61;&#105;&#108;&#x74;&#111;&#x3a;&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;</a> to the CC list of
adds the npm support staff <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#111;&#58;&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#111;&#x6d;">&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#111;&#x6d;</a> to the CC list of
the email. Mention in the email that Bob can run <code>npm owner add
joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
<li>After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can&#39;t come to any sort of resolution, email support
<a href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#x3a;&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
<a href="&#109;&#x61;&#x69;&#108;&#116;&#111;&#58;&#x73;&#117;&#112;&#x70;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#117;&#112;&#x70;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
usually at least 4 weeks, but extra time is allowed around common
holidays.)</li>
</ol>
@@ -225,7 +225,7 @@ <h2 id="i-get-econnrefused-a-lot-what-s-up-">I get ECONNREFUSED a lot. What&#39
<p>To check if the registry is down, open up
<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser. This will also tell
you if you are just unable to access the internet for some reason.</p>
<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</a>
<p>If the registry IS down, let us know by emailing <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;">&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;</a>
or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>. If it&#39;s
down for the world (and not just on your local network) then we&#39;re
probably already being pinged about it.</p>
@@ -45,6 +45,8 @@ <h3 id="npm-install-1-"><a href="../cli/npm-install.html">npm-install(1)</a></h3
<p>Install a package</p>
<h3 id="npm-link-1-"><a href="../cli/npm-link.html">npm-link(1)</a></h3>
<p>Symlink a package folder</p>
<h3 id="npm-logout-1-"><a href="../cli/npm-logout.html">npm-logout(1)</a></h3>
<p>Log out of the registry</p>
<h3 id="npm-ls-1-"><a href="../cli/npm-ls.html">npm-ls(1)</a></h3>
<p>List installed packages</p>
<h3 id="npm-outdated-1-"><a href="../cli/npm-outdated.html">npm-outdated(1)</a></h3>
@@ -30,41 +30,23 @@ <h2 id="description">DESCRIPTION</h2>
run-script &lt;pkg&gt; &lt;stage&gt;</code>. <em>Pre</em> and <em>post</em> commands with matching
names will be run for those as well (e.g. <code>premyscript</code>, <code>myscript</code>,
<code>postmyscript</code>).</p>
<h2 id="note-install-scripts-are-an-antipattern">NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN</h2>
<p><strong>tl;dr</strong> Don&#39;t use <code>install</code>. Use a <code>.gyp</code> file for compilation, and
<code>prepublish</code> for anything else.</p>
<p>You should almost never have to explicitly set a <code>preinstall</code> or
<code>install</code> script. If you are doing this, please consider if there is
another option.</p>
<p>The only valid use of <code>install</code> or <code>preinstall</code> scripts is for
compilation which must be done on the target architecture. In early
versions of node, this was often done using the <code>node-waf</code> scripts, or
a standalone <code>Makefile</code>, and early versions of npm required that it be
explicitly set in package.json. This was not portable, and harder to
do properly.</p>
<p>In the current version of node, the standard way to do this is using a
<code>.gyp</code> file. If you have a file with a <code>.gyp</code> extension in the root
of your package, then npm will run the appropriate <code>node-gyp</code> commands
automatically at install time. This is the only officially supported
method for compiling binary addons, and does not require that you add
anything to your package.json file.</p>
<p>If you have to do other things before your package is used, in a way
<h2 id="common-uses">COMMON USES</h2>
<p>If you need to perform operations on your package before it is used, in a way
that is not dependent on the operating system or architecture of the
target system, then use a <code>prepublish</code> script instead. This includes
target system, use a <code>prepublish</code> script. This includes
tasks such as:</p>
<ul>
<li>Compile CoffeeScript source code into JavaScript.</li>
<li>Create minified versions of JavaScript source code.</li>
<li>Compiling CoffeeScript source code into JavaScript.</li>
<li>Creating minified versions of JavaScript source code.</li>
<li>Fetching remote resources that your package will use.</li>
</ul>
<p>The advantage of doing these things at <code>prepublish</code> time instead of
<code>preinstall</code> or <code>install</code> time is that they can be done once, in a
single place, and thus greatly reduce complexity and variability.
<p>The advantage of doing these things at <code>prepublish</code> time is that they can be done once, in a
single place, thus reducing complexity and variability.
Additionally, this means that:</p>
<ul>
<li>You can depend on <code>coffee-script</code> as a <code>devDependency</code>, and thus
your users don&#39;t need to have it installed.</li>
<li>You don&#39;t need to include the minifiers in your package, reducing
<li>You don&#39;t need to include minifiers in your package, reducing
the size for your users.</li>
<li>You don&#39;t need to rely on your users having <code>curl</code> or <code>wget</code> or
other system tools on the target machines.</li>
@@ -185,6 +167,11 @@ <h2 id="best-practices">BEST PRACTICES</h2>
<li>Don&#39;t prefix your script commands with &quot;sudo&quot;. If root permissions
are required for some reason, then it&#39;ll fail with that error, and
the user will sudo the npm command in question.</li>
<li>Don&#39;t use <code>install</code>. Use a <code>.gyp</code> file for compilation, and <code>prepublish</code>
for anything else. You should almost never have to explicitly set a
preinstall or install script. If you are doing this, please consider if
there is another option. The only valid use of <code>install</code> or <code>preinstall</code>
scripts is for compilation which must be done on the target architecture.</li>
</ul>
<h2 id="see-also">SEE ALSO</h2>
<ul>
@@ -83,7 +83,7 @@ <h3 id="prerelease-tags">Prerelease Tags</h3>
<h4 id="prerelease-identifiers">Prerelease Identifiers</h4>
<p>The method <code>.inc</code> takes an additional <code>identifier</code> string argument that
will append the value of the string as a prerelease identifier:</p>
<pre><code class="lang-`javascript">&gt; semver.inc(&#39;1.2.3&#39;, &#39;pre&#39;, &#39;beta&#39;)
<pre><code class="lang-javascript">&gt; semver.inc(&#39;1.2.3&#39;, &#39;pre&#39;, &#39;beta&#39;)
&#39;1.2.4-beta.0&#39;
</code></pre>
<p>command-line example:</p>
@@ -208,6 +208,9 @@ <h2 id="functions">Functions</h2>
increments it.</li>
</ul>
</li>
<li><code>major(v)</code>: Return the major version number.</li>
<li><code>minor(v)</code>: Return the minor version number.</li>
<li><code>patch(v)</code>: Return the patch version number.</li>
</ul>
<h3 id="comparison">Comparison</h3>
<ul>
@@ -13,14 +13,9 @@ var npm = require("./npm.js")
, mapToRegistry = require("./utils/map-to-registry.js")

bugs.completion = function (opts, cb) {
if (opts.conf.argv.remain.length > 2) return cb()
mapToRegistry("-/short", npm.config, function (er, uri, auth) {
if (er) return cb(er)

npm.registry.get(uri, { timeout : 60000, auth : auth }, function (er, list) {
return cb(null, list || [])
})
})
// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
cb()
}

function bugs (args, cb) {
@@ -239,8 +239,9 @@ function linkMans (pkg, folder, parent, gtop, cb) {
var stem = parseMan[1]
var sxn = parseMan[2]
var bn = path.basename(stem)
var manSrc = path.resolve(folder, man)
var manDest = path.join(manRoot, "man" + sxn, bn)

linkIfExists(man, manDest, gtop && folder, cb)
linkIfExists(manSrc, manDest, gtop && folder, cb)
}, cb)
}
@@ -12,6 +12,7 @@ var path = require("path")
, addRemoteTarball = require("./add-remote-tarball.js")
, cachedPackageRoot = require("./cached-package-root.js")
, mapToRegistry = require("../utils/map-to-registry.js")
, warnStrict = require("../utils/warn-deprecated.js")("engineStrict")


module.exports = addNamed
@@ -91,6 +92,12 @@ function engineFilter (data) {
Object.keys(data.versions || {}).forEach(function (v) {
var eng = data.versions[v].engines
if (!eng) return
if (data.versions[v].engineStrict) {
warnStrict([
"Per-package engineStrict (found in package.json for "+data.name+")",
"won't be used in npm 3+. Use the config setting `engine-strict` instead."
], data.name)
}
if (!strict && !data.versions[v].engineStrict) return
if (eng.node && !semver.satisfies(nodev, eng.node, true)
|| eng.npm && !semver.satisfies(npmv, eng.npm, true)) {
@@ -188,7 +188,9 @@ function resolveHead (p, u, co, origUrl, cb) {
parsed.hash = stdout
var resolved = url.format(parsed)

if (parsed.protocol !== "git:") resolved = "git+" + resolved
if (!/^git[+:]/.test(parsed.protocol)) {
resolved = "git+" + resolved
}

// https://github.com/npm/npm/issues/3224
// node incorrectly sticks a / at the start of the path We know that the
@@ -11,7 +11,7 @@ module.exports = function maybeGithub (p, cb) {

return addRemoteGit(u, true, function (er, data) {
if (er) {
var upriv = "git+ssh://git@github.com:" + p
var upriv = "ssh://git@github.com:" + p
log.info("maybeGithub", "Attempting %s from %s", p, upriv)

return addRemoteGit(upriv, false, function (er, data) {
@@ -0,0 +1,16 @@
var assert = require("assert")

var toNerfDart = require("./nerf-dart.js")

module.exports = clearCredentialsByURI

function clearCredentialsByURI (uri) {
assert(uri && typeof uri === "string", "registry URL is required")

var nerfed = toNerfDart(uri)

this.del(nerfed + ":_authToken", "user")
this.del(nerfed + ":_password", "user")
this.del(nerfed + ":username", "user")
this.del(nerfed + ":email", "user")
}
@@ -152,10 +152,17 @@ function load_(builtin, rc, cli, cb) {
// annoying humans and their expectations!
if (conf.get("prefix")) {
var etc = path.resolve(conf.get("prefix"), "etc")
defaults.globalconfig = path.resolve(etc, "npmrc")
defaults.globalignorefile = path.resolve(etc, "npmignore")
mkdirp(etc, function (err) {
defaults.globalconfig = path.resolve(etc, "npmrc")
defaults.globalignorefile = path.resolve(etc, "npmignore")
afterUserContinuation()
})
} else {
afterUserContinuation()
}
}

function afterUserContinuation() {
conf.addFile(conf.get("globalconfig"), "global")

// move the builtin into the conf stack now.
@@ -220,6 +227,7 @@ Conf.prototype.setUser = require("./set-user.js")
Conf.prototype.findPrefix = require("./find-prefix.js")
Conf.prototype.getCredentialsByURI = require("./get-credentials-by-uri.js")
Conf.prototype.setCredentialsByURI = require("./set-credentials-by-uri.js")
Conf.prototype.clearCredentialsByURI = require("./clear-credentials-by-uri.js")

Conf.prototype.loadExtras = function(cb) {
this.setUser(function(er) {
@@ -160,6 +160,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
, group : process.platform === "win32" ? 0
: process.env.SUDO_GID || (process.getgid && process.getgid())
, heading: "npm"
, "if-present": false
, "ignore-scripts": false
, "init-module": path.resolve(home, ".npm-init.js")
, "init-author-name" : ""
@@ -262,6 +263,7 @@ exports.types =
, "https-proxy" : [null, url]
, "user-agent" : String
, "heading": String
, "if-present": Boolean
, "ignore-scripts": Boolean
, "init-module": path
, "init-author-name" : String
@@ -11,13 +11,9 @@ var npm = require("./npm.js")
, mapToRegistry = require("./utils/map-to-registry.js")

docs.completion = function (opts, cb) {
mapToRegistry("/-/short", npm.config, function (er, uri, auth) {
if (er) return cb(er)

npm.registry.get(uri, { timeout : 60000, auth : auth }, function (er, list) {
return cb(null, list || [])
})
})
// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
cb()
}

function url (json) {
@@ -59,19 +59,23 @@ function help (args, cb) {
var manroot = path.resolve(__dirname, "..", "man")

// legacy
if (section === "global")
section = "folders"
else if (section === "json")
section = "package.json"
if (section === "global") section = "folders"
else if (section === "json") section = "package.json"

// find either /section.n or /npm-section.n
var f = "+(npm-" + section + "|" + section + ").[0-9]"
var compext = "\\.+(gz|bz2|lzma|[FYzZ]|xz)$"
var f = "+(npm-" + section + "|" + section + ").[0-9]?(" + compext + ")"
return glob(manroot + "/*/" + f, function (er, mans) {
if (er)
return cb(er)
if (er) return cb(er)

if (!mans.length) return npm.commands["help-search"](args, cb)

if (!mans.length)
return npm.commands["help-search"](args, cb)
mans = mans.map(function (man) {
var ext = path.extname(man)
if (man.match(new RegExp(compext))) man = path.basename(man, ext)

return man
})

viewMan(pickMan(mans, pref), cb)
})
@@ -32,38 +32,58 @@ install.completion = function (opts, cb) {
// install can complete to a folder with a package.json, or any package.
// if it has a slash, then it's gotta be a folder
// if it starts with https?://, then just give up, because it's a url
// for now, not yet implemented.
mapToRegistry("-/short", npm.config, function (er, uri, auth) {
if (er) return cb(er)

var options = { auth : auth }
npm.registry.get(uri, options, function (er, pkgs) {
if (er) return cb()
if (!opts.partialWord) return cb(null, pkgs)
if (/^https?:\/\//.test(opts.partialWord)) {
// do not complete to URLs
return cb(null, [])
}

var name = npa(opts.partialWord).name
pkgs = pkgs.filter(function (p) {
return p.indexOf(name) === 0
if (/\//.test(opts.partialWord)) {
// Complete fully to folder if there is exactly one match and it
// is a folder containing a package.json file. If that is not the
// case we return 0 matches, which will trigger the default bash
// complete.
var lastSlashIdx = opts.partialWord.lastIndexOf("/")
var partialName = opts.partialWord.slice(lastSlashIdx + 1)
var partialPath = opts.partialWord.slice(0, lastSlashIdx)
if (partialPath === "") partialPath = "/"

function annotatePackageDirMatch (sibling, cb) {
var fullPath = path.join(partialPath, sibling)
if (sibling.slice(0, partialName.length) !== partialName) {
return cb(null, null) // not name match
}
fs.readdir(fullPath, function (err, contents) {
if (err) return cb(null, { isPackage: false })

cb(
null,
{
fullPath: fullPath,
isPackage: contents.indexOf("package.json") !== -1
}
)
})
}

if (pkgs.length !== 1 && opts.partialWord === name) {
return cb(null, pkgs)
}
return fs.readdir(partialPath, function (err, siblings) {
if (err) return cb(null, []) // invalid dir: no matching

mapToRegistry(pkgs[0], npm.config, function (er, uri) {
if (er) return cb(er)
asyncMap(siblings, annotatePackageDirMatch, function (err, matches) {
if (err) return cb(err)

npm.registry.get(uri, options, function (er, d) {
if (er) return cb()
return cb(null, Object.keys(d["dist-tags"] || {})
.concat(Object.keys(d.versions || {}))
.map(function (t) {
return pkgs[0] + "@" + t
}))
})
var cleaned = matches.filter(function (x) { return x !== null })
if (cleaned.length !== 1) return cb(null, [])
if (!cleaned[0].isPackage) return cb(null, [])

// Success - only one match and it is a package dir
return cb(null, [cleaned[0].fullPath])
})
})
})
}

// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
cb()
}

var npm = require("./npm.js")
@@ -89,6 +109,7 @@ var npm = require("./npm.js")
, locker = require("./utils/locker.js")
, lock = locker.lock
, unlock = locker.unlock
, warnPeers = require("./utils/warn-deprecated.js")("peerDependencies")

function install (args, cb_) {
var hasArguments = !!args.length
@@ -159,6 +180,11 @@ function install (args, cb_) {
"install",
"peerDependency", dep, "wasn't going to be installed; adding"
)
warnPeers([
"The peer dependency "+dep+" included from "+data.name+" will no",
"longer be automatically installed to fulfill the peerDependency ",
"in npm 3+. Your application will need to depend on it explicitly."
], dep+","+data.name)
peers.push(dep)
}
})
@@ -1036,6 +1062,13 @@ function write (target, targetFolder, context, cb_) {
// favor of killing implicit peerDependency installs with fire.
var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled,
wrap, family)
peerDeps.forEach(function (pd) {
warnPeers([
"The peer dependency "+pd+" included from "+data.name+" will no",
"longer be automatically installed to fulfill the peerDependency ",
"in npm 3+. Your application will need to depend on it explicitly."
], pd+","+data.name)
})
var pdTargetFolder = path.resolve(targetFolder, "..", "..")
var pdContext = context
if (peerDeps.length > 0) {
@@ -0,0 +1,40 @@
module.exports = logout

var dezalgo = require("dezalgo")
var log = require("npmlog")

var npm = require("./npm.js")
var mapToRegistry = require("./utils/map-to-registry.js")

logout.usage = "npm logout [--registry] [--scope]"

function logout (args, cb) {
npm.spinner.start()
cb = dezalgo(cb)

mapToRegistry("/", npm.config, function (err, uri, auth, normalized) {
if (err) return cb(err)

if (auth.token) {
log.verbose("logout", "clearing session token for", normalized)
npm.registry.logout(normalized, { auth: auth }, function (err) {
if (err) return cb(err)

npm.config.clearCredentialsByURI(normalized)
npm.spinner.stop()
npm.config.save("user", cb)
})
}
else if (auth.username || auth.password) {
log.verbose("logout", "clearing user credentials for", normalized)
npm.config.clearCredentialsByURI(normalized)
npm.spinner.stop()
npm.config.save("user", cb)
}
else {
cb(new Error(
"Not logged in to", normalized + ",", "so can't log out."
))
}
})
}
@@ -40,6 +40,7 @@ function ls (args, silent, cb) {
var opt = { depth: depth, log: log.warn, dev: true }
readInstalled(dir, opt, function (er, data) {
pruneNestedExtraneous(data)
filterByEnv(data)
var bfs = bfsify(data, args)
, lite = getLite(bfs)

@@ -88,6 +89,21 @@ function pruneNestedExtraneous (data, visited) {
}
}

function filterByEnv (data) {
var dev = npm.config.get("dev")
var production = npm.config.get("production")
if (dev === production) return
var dependencies = {}
var devDependencies = data.devDependencies || []
Object.keys(data.dependencies).forEach(function (name) {
var keys = Object.keys(devDependencies)
if (production && keys.indexOf(name) !== -1) return
if (dev && keys.indexOf(name) === -1) return
dependencies[name] = data.dependencies[name]
})
data.dependencies = dependencies
}

function alphasort (a, b) {
a = a.toLowerCase()
b = b.toLowerCase()
@@ -110,6 +110,7 @@ var commandCache = {}
, "stars"
, "tag"
, "adduser"
, "logout"
, "unpublish"
, "owner"
, "access"
@@ -223,7 +224,7 @@ Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
})

return commandCache[a]
}, enumerable: fullList.indexOf(c) !== -1 })
}, enumerable: fullList.indexOf(c) !== -1, configurable: true })

// make css-case commands callable via camelCase as well
if (c.match(/\-([a-z])/)) {
@@ -40,7 +40,12 @@ var path = require("path")
function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
var dir = path.resolve(npm.dir, "..")

// default depth for `outdated` is 0 (cf. `ls`)
if (npm.config.get("depth") === Infinity) npm.config.set("depth", 0)

outdated_(args, dir, {}, 0, function (er, list) {
if (!list) list = []
if (er || silent || list.length === 0) return cb(er, list)
if (npm.config.get("json")) {
console.log(makeJSON(list))
@@ -26,12 +26,9 @@ owner.completion = function (opts, cb) {
var byUser, theUser
switch (argv[2]) {
case "ls":
if (argv.length > 3) return cb()
return mapToRegistry("-/short", npm.config, function (er, uri, auth) {
if (er) return cb(er)

npm.registry.get(uri, { auth : auth }, cb)
})
// FIXME: there used to be registry completion here, but it stopped
// making sense somewhere around 50,000 packages on the registry
return cb()

case "rm":
if (argv.length > 3) {
@@ -15,14 +15,9 @@ var npm = require("./npm.js")
, npa = require("npm-package-arg")

repo.completion = function (opts, cb) {
if (opts.conf.argv.remain.length > 2) return cb()
mapToRegistry("/-/short", npm.config, function (er, uri) {
if (er) return cb(er)

npm.registry.get(uri, { timeout : 60000 }, function (er, list) {
return cb(null, list || [])
})
})
// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
cb()
}

function repo (args, cb) {
@@ -84,39 +84,64 @@ function runScript (args, cb) {

function list(cb) {
var json = path.join(npm.localPrefix, "package.json")
var cmdList = [ "publish", "install", "uninstall"
, "test", "stop", "start", "restart"
].reduce(function (l, p) {
return l.concat(["pre" + p, p, "post" + p])
}, [])
return readJson(json, function(er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er) d = {}
var scripts = Object.keys(d.scripts || {})
var allScripts = Object.keys(d.scripts || {})
var scripts = []
var runScripts = []
allScripts.forEach(function (script) {
if (cmdList.indexOf(script) !== -1) scripts.push(script)
else runScripts.push(script)
})

if (log.level === "silent") {
return cb(null, scripts)
return cb(null, allScripts)
}

if (npm.config.get("json")) {
console.log(JSON.stringify(d.scripts || {}, null, 2))
return cb(null, scripts)
return cb(null, allScripts)
}

if (npm.config.get("parseable")) {
allScripts.forEach(function(script) {
console.log(script + ":" + d.scripts[script])
})
return cb(null, allScripts)
}

var s = ":"
var prefix = ""
if (!npm.config.get("parseable")) {
s = "\n "
prefix = " "
console.log("Available scripts in the %s package:", d.name)
var s = "\n "
var prefix = " "
if (scripts.length) {
console.log("Lifecycle scripts included in %s:", d.name)
}
scripts.forEach(function(script) {
console.log(prefix + script + s + d.scripts[script])
})
return cb(null, scripts)
if (!scripts.length && runScripts.length) {
console.log("Scripts available in %s via `npm run-script`:", d.name)
}
else if (runScripts.length) {
console.log("\navailable via `npm run-script`:")
}
runScripts.forEach(function(script) {
console.log(prefix + script + s + d.scripts[script])
})
return cb(null, allScripts)
})
}

function run (pkg, wd, cmd, args, cb) {
if (!pkg.scripts) pkg.scripts = {}

var cmds
if (cmd === "restart") {
if (cmd === "restart" && !pkg.scripts.restart) {
cmds = [
"prestop", "stop", "poststop",
"restart",
@@ -134,6 +159,8 @@ function run (pkg, wd, cmd, args, cb) {
log.verbose("run-script using default platform env: env (Unix)")
pkg.scripts[cmd] = "env"
}
} else if (npm.config.get("if-present")) {
return cb(null);
} else {
return cb(new Error("missing script: " + cmd))
}
@@ -10,17 +10,9 @@ star.usage = "npm star <package> [pkg, pkg, ...]\n"
+ "npm unstar <package> [pkg, pkg, ...]"

star.completion = function (opts, cb) {
mapToRegistry("-/short", npm.config, function (er, uri, auth) {
if (er) return cb(er)

var params = {
timeout : 60000,
auth : auth
}
npm.registry.get(uri, params, function (er, list) {
return cb(null, list || [])
})
})
// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
cb()
}

function star (args, cb) {
@@ -28,12 +28,11 @@ function uninstall (args, cb) {
if (args.length) return uninstall_(args, nm, cb)

// remove this package from the global space, if it's installed there
if (npm.config.get("global")) return cb(uninstall.usage)
readJson(path.resolve(npm.prefix, "package.json"), function (er, pkg) {
readJson(path.resolve(npm.localPrefix, "package.json"), function (er, pkg) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er) return cb(uninstall.usage)
uninstall_( [pkg.name]
, npm.dir
, npm.globalDir
, cb )
})

@@ -21,10 +21,10 @@ if type complete &>/dev/null; then
2>/dev/null)) || return $?
IFS="$si"
}
complete -F _npm_completion npm
complete -o default -F _npm_completion npm
elif type compdef &>/dev/null; then
_npm_completion() {
si=$IFS
local si=$IFS
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
@@ -304,11 +304,15 @@ function errorHandler (er) {
break

case "ETARGET":
log.error("notarget", [er.message
var msg = [er.message
,"This is most likely not a problem with npm itself."
,"In most cases you or one of your dependencies are requesting"
,"a package version that doesn't exist."
].join("\n"))
]
if (er.parent) {
msg.push("\nIt was specified as a dependency of '"+er.parent+"'\n")
}
log.error("notarget", msg.join("\n"))
break

case "ENOTSUP":
@@ -18,8 +18,13 @@ function prefixGitArgs () {
}

function execGit (args, options, cb) {
log.info("git", args)
return exec(git, prefixGitArgs().concat(args || []), options, cb)
log.info('git', args)
var fullArgs = prefixGitArgs().concat(args || [])
return exec(git, fullArgs, options, function (err) {
if (err) log.error('git', fullArgs.join(' '))

cb.apply(null, arguments)
})
}

function spawnGit (args, options) {
@@ -0,0 +1,24 @@
module.exports = warnDeprecated

var log = require("npmlog")

var deprecations = {}

function warnDeprecated (type) {
return function warn (messages, instance) {
if (!instance) {
if (!deprecations[type]) {
deprecations[type] = {}
messages.forEach(function (m) { log.warn(type, m) })
}
}
else {
if (!deprecations[type]) deprecations[type] = {}

if (!deprecations[type][instance]) {
deprecations[type][instance] = true
messages.forEach(function (m) { log.warn(type, m) })
}
}
}
}
@@ -14,11 +14,9 @@ var npm = require("./npm.js")

view.completion = function (opts, cb) {
if (opts.conf.argv.remain.length <= 2) {
return mapToRegistry("-/short", npm.config, function (er, uri, auth) {
if (er) return cb(er)

npm.registry.get(uri, { auth : auth }, cb)
})
// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
return cb()
}
// have the package, get the fields.
var tag = npm.config.get("tag")
@@ -1,4 +1,4 @@
.TH "NPM" "1" "February 2015" "" ""
.TH "NPM" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
@@ -192,7 +192,7 @@ npm, Inc\. or the Node\.js project\.
.P
Data published to the npm registry is not part of npm itself, and is
the sole property of the publisher\. While every effort is made to
ensure accountability, there is absolutely no guarantee, warrantee, or
ensure accountability, there is absolutely no guarantee, warranty, or
assertion expressed or implied as to the quality, fitness for a
specific purpose, or lack of malice in any given npm package\.
.P
@@ -1,4 +1,4 @@
.TH "NPM\-ACCESS" "1" "February 2015" "" ""
.TH "NPM\-ACCESS" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-ADDUSER" "1" "February 2015" "" ""
.TH "NPM\-ADDUSER" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BIN" "1" "February 2015" "" ""
.TH "NPM\-BIN" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BUGS" "1" "February 2015" "" ""
.TH "NPM\-BUGS" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BUILD" "1" "February 2015" "" ""
.TH "NPM\-BUILD" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BUNDLE" "1" "February 2015" "" ""
.TH "NPM\-BUNDLE" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "NPM\-CACHE" "1" "February 2015" "" ""
.TH "NPM\-CACHE" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-COMPLETION" "1" "February 2015" "" ""
.TH "NPM\-COMPLETION" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-CONFIG" "1" "February 2015" "" ""
.TH "NPM\-CONFIG" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DEDUPE" "1" "February 2015" "" ""
.TH "NPM\-DEDUPE" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DEPRECATE" "1" "February 2015" "" ""
.TH "NPM\-DEPRECATE" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DIST\-TAG" "1" "February 2015" "" ""
.TH "NPM\-DIST\-TAG" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SH SYNOPSIS
@@ -24,7 +24,7 @@ Clear a tag that is no longer in use from the package\.
.IP \(bu 2
ls:
Show all of the dist\-tags for a package, defaulting to the package in
the curren prefix\.
the current prefix\.

.RE
.P
@@ -1,4 +1,4 @@
.TH "NPM\-DOCS" "1" "February 2015" "" ""
.TH "NPM\-DOCS" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-EDIT" "1" "February 2015" "" ""
.TH "NPM\-EDIT" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-EXPLORE" "1" "February 2015" "" ""
.TH "NPM\-EXPLORE" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-HELP\-SEARCH" "1" "February 2015" "" ""
.TH "NPM\-HELP\-SEARCH" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-HELP" "1" "February 2015" "" ""
.TH "NPM\-HELP" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-INIT" "1" "February 2015" "" ""
.TH "NPM\-INIT" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
@@ -23,6 +23,17 @@ without a really good reason to do so\.
.P
If you invoke it with \fB\-f\fR, \fB\-\-force\fR, \fB\-y\fR, or \fB\-\-yes\fR, it will use only
defaults and not prompt you for any options\.
.SH CONFIGURATION
.SS scope
.RS 0
.IP \(bu 2
Default: none
.IP \(bu 2
Type: String

.RE
.P
The scope under which the new module should be created\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
@@ -31,6 +42,8 @@ https://github\.com/isaacs/init\-package\-json
npm help 5 package\.json
.IP \(bu 2
npm help version
.IP \(bu 2
npm help 7 scope

.RE

@@ -1,4 +1,4 @@
.TH "NPM\-INSTALL" "1" "February 2015" "" ""
.TH "NPM\-INSTALL" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
@@ -52,9 +52,10 @@ after packing it up into a tarball (b)\.
In global mode (ie, with \fB\-g\fR or \fB\-\-global\fR appended to the command),
it installs the current package context (ie, the current working
directory) as a global package\.
By default, \fBnpm install\fR will install all modules listed as
dependencies\. With the \fB\-\-production\fR flag,
npm will not install modules listed in \fBdevDependencies\fR\|\.
By default, \fBnpm install\fR will install all modules listed as dependencies\.
With the \fB\-\-production\fR flag (or when the \fBNODE_ENV\fR environment variable
is set to \fBproduction\fR), npm will not install modules listed in
\fBdevDependencies\fR\|\.
.IP \(bu 2
\fBnpm install <folder>\fR:
Install a package that is sitting in a folder on the filesystem\.
@@ -1,4 +1,4 @@
.TH "NPM\-LINK" "1" "February 2015" "" ""
.TH "NPM\-LINK" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
@@ -45,7 +45,7 @@ npm link redis # link\-install the package
.RE
.P
Now, any changes to ~/projects/node\-redis will be reflected in
~/projects/node\-bloggy/node_modules/redis/
~/projects/node\-bloggy/node_modules/node\-redis/
.P
You may also shortcut the two steps in one\. For example, to do the
above use\-case in a shorter way:
@@ -62,7 +62,7 @@ The second line is the equivalent of doing:
.RS 2
.nf
(cd \.\./node\-redis; npm link)
npm link redis
npm link node\-redis
.fi
.RE
.P
@@ -0,0 +1,62 @@
.TH "NPM\-LOGOUT" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SH SYNOPSIS
.P
.RS 2
.nf
npm logout [\-\-registry=url] [\-\-scope=@orgname]
.fi
.RE
.SH DESCRIPTION
.P
When logged into a registry that supports token\-based authentication, tell the
server to end this token's session\. This will invalidate the token everywhere
you're using it, not just for the current environment\.
.P
When logged into a legacy registry that uses username and password authentication, this will
clear the credentials in your user configuration\. In this case, it will \fIonly\fR affect
the current environment\.
.P
If \fB\-\-scope\fR is provided, this will find the credentials for the registry
connected to that scope, if set\.
.SH CONFIGURATION
.SS registry
.P
Default: http://registry\.npmjs\.org/
.P
The base URL of the npm package registry\. If \fBscope\fR is also specified,
it takes precedence\.
.SS scope
.P
Default: none
.P
If specified, the user and login credentials given will be associated
with the specified scope\. See npm help 7 \fBnpm\-scope\fR\|\. You can use both at the same time,
e\.g\.
.P
.RS 2
.nf
npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco
.fi
.RE
.P
This will set a registry for the given scope and login or create a user for
that registry at the same time\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
npm help adduser
.IP \(bu 2
npm help 7 registry
.IP \(bu 2
npm help config
.IP \(bu 2
npm help 7 config
.IP \(bu 2
npm help 5 npmrc
.IP \(bu 2
npm help whoami

.RE

@@ -1,4 +1,4 @@
.TH "NPM\-LS" "1" "February 2015" "" ""
.TH "NPM\-LS" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show:
.P
.RS 2
.nf
npm@2.5.1 /path/to/npm
npm@2.7.0 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
@@ -86,6 +86,26 @@ Type: Int
.RE
.P
Max display depth of the dependency tree\.
.SS prod / production
.RS 0
.IP \(bu 2
Type: Boolean
.IP \(bu 2
Default: false

.RE
.P
Display only the dependency tree for packages in \fBdependencies\fR\|\.
.SS dev
.RS 0
.IP \(bu 2
Type: Boolean
.IP \(bu 2
Default: false

.RE
.P
Display only the dependency tree for packages in \fBdevDependencies\fR\|\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
@@ -1,4 +1,4 @@
.TH "NPM\-OUTDATED" "1" "February 2015" "" ""
.TH "NPM\-OUTDATED" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-OWNER" "1" "February 2015" "" ""
.TH "NPM\-OWNER" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PACK" "1" "February 2015" "" ""
.TH "NPM\-PACK" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PREFIX" "1" "February 2015" "" ""
.TH "NPM\-PREFIX" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PRUNE" "1" "February 2015" "" ""
.TH "NPM\-PRUNE" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PUBLISH" "1" "February 2015" "" ""
.TH "NPM\-PUBLISH" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-REBUILD" "1" "February 2015" "" ""
.TH "NPM\-REBUILD" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-REPO" "1" "February 2015" "" ""
.TH "NPM\-REPO" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RESTART" "1" "February 2015" "" ""
.TH "NPM\-RESTART" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RM" "1" "February 2015" "" ""
.TH "NPM\-RM" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-ROOT" "1" "February 2015" "" ""
.TH "NPM\-ROOT" "1" "March 2015" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS