summaryrefslogtreecommitdiff
path: root/deps/npm/html/doc/cli/npm-install.html
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2014-09-24 14:41:07 -0700
committerTimothy J Fontaine <tjfontaine@gmail.com>2014-09-24 17:15:10 -0700
commit9fad8958df671c0e894506ef59b4c781c3dfb349 (patch)
tree4db7643b40c4ffd726fb27fb4aa276d420b3bfd8 /deps/npm/html/doc/cli/npm-install.html
parentb26dd4e5ab9192bad72b9dc61fa4ad2d8f215da2 (diff)
downloadnode-new-9fad8958df671c0e894506ef59b4c781c3dfb349.tar.gz
deps: upgrade npm to 2.0.0
Diffstat (limited to 'deps/npm/html/doc/cli/npm-install.html')
-rw-r--r--deps/npm/html/doc/cli/npm-install.html41
1 files changed, 30 insertions, 11 deletions
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 28b6afe39d..38d160fac2 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -15,10 +15,10 @@
npm install &lt;tarball file&gt;
npm install &lt;tarball url&gt;
npm install &lt;folder&gt;
-npm install &lt;name&gt; [--save|--save-dev|--save-optional] [--save-exact]
-npm install &lt;name&gt;@&lt;tag&gt;
-npm install &lt;name&gt;@&lt;version&gt;
-npm install &lt;name&gt;@&lt;version range&gt;
+npm install [@&lt;scope&gt;/]&lt;name&gt; [--save|--save-dev|--save-optional] [--save-exact]
+npm install [@&lt;scope&gt;/]&lt;name&gt;@&lt;tag&gt;
+npm install [@&lt;scope&gt;/]&lt;name&gt;@&lt;version&gt;
+npm install [@&lt;scope&gt;/]&lt;name&gt;@&lt;version range&gt;
npm i (with any of the previous argument usage)
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command installs a package, and any packages that it depends on. If the
@@ -64,7 +64,7 @@ after packing it up into a tarball (b).</p>
<p> Example:</p>
<pre><code> npm install https://github.com/indexzero/forever/tarball/v0.5.6
</code></pre></li>
-<li><p><code>npm install &lt;name&gt; [--save|--save-dev|--save-optional]</code>:</p>
+<li><p><code>npm install [@&lt;scope&gt;/]&lt;name&gt; [--save|--save-dev|--save-optional]</code>:</p>
<p> Do a <code>&lt;name&gt;@&lt;tag&gt;</code> install, where <code>&lt;tag&gt;</code> is the &quot;tag&quot; config. (See
<code><a href="../misc/npm-config.html">npm-config(7)</a></code>.)</p>
<p> In most cases, this will install the latest version
@@ -85,8 +85,16 @@ package.json, there is an additional, optional flag:</p>
<li><p><code>--save-exact</code>: Saved dependencies will be configured with an
exact version rather than using npm&#39;s default semver range
operator.</p>
+<p><code>&lt;scope&gt;</code> is optional. The package will be downloaded from the registry
+associated with the specified scope. If no registry is associated with
+the given scope the default registry is assumed. See <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>.</p>
+<p>Note: if you do not include the @-symbol on your scope name, npm will
+interpret this as a GitHub repository instead, see below. Scopes names
+must also be followed by a slash.</p>
<p>Examples:</p>
<pre><code>npm install sax --save
+npm install githubname/reponame
+npm install @myorg/privatepackage
npm install node-tap --save-dev
npm install dtrace-provider --save-optional
npm install readable-stream --save --save-exact
@@ -98,27 +106,38 @@ npm install readable-stream --save --save-exact
working directory, then it will try to install that, and only try to
fetch the package by name if it is not valid.
</code></pre><ul>
-<li><p><code>npm install &lt;name&gt;@&lt;tag&gt;</code>:</p>
+<li><p><code>npm install [@&lt;scope&gt;/]&lt;name&gt;@&lt;tag&gt;</code>:</p>
<p> Install the version of the package that is referenced by the specified tag.
If the tag does not exist in the registry data for that package, then this
will fail.</p>
<p> Example:</p>
<pre><code> npm install sax@latest
+ npm install @myorg/mypackage@latest
</code></pre></li>
-<li><p><code>npm install &lt;name&gt;@&lt;version&gt;</code>:</p>
-<p> Install the specified version of the package. This will fail if the version
- has not been published to the registry.</p>
+<li><p><code>npm install [@&lt;scope&gt;/]&lt;name&gt;@&lt;version&gt;</code>:</p>
+<p> Install the specified version of the package. This will fail if the
+ version has not been published to the registry.</p>
<p> Example:</p>
<pre><code> npm install sax@0.1.1
+ npm install @myorg/privatepackage@1.5.0
</code></pre></li>
-<li><p><code>npm install &lt;name&gt;@&lt;version range&gt;</code>:</p>
+<li><p><code>npm install [@&lt;scope&gt;/]&lt;name&gt;@&lt;version range&gt;</code>:</p>
<p> Install a version of the package matching the specified version range. This
will follow the same rules for resolving dependencies described in <code><a href="../files/package.json.html">package.json(5)</a></code>.</p>
<p> Note that most version ranges must be put in quotes so that your shell will
treat it as a single argument.</p>
<p> Example:</p>
<pre><code> npm install sax@&quot;&gt;=0.1.0 &lt;0.2.0&quot;
+ npm install @myorg/privatepackage@&quot;&gt;=0.1.0 &lt;0.2.0&quot;
</code></pre></li>
+<li><p><code>npm install &lt;githubname&gt;/&lt;githubrepo&gt;</code>:</p>
+<p> Install the package at <code>https://github.com/githubname/githubrepo&quot; by
+ attempting to clone it using</code>git`.</p>
+<p> Example:</p>
+<pre><code> npm install mygithubuser/myproject
+</code></pre><p> To reference a package in a git repo that is not on GitHub, see git
+ remote urls below.</p>
+</li>
<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
<p> Install a package by cloning a git remote url. The format of the git
url is:</p>
@@ -220,5 +239,5 @@ affects a real use-case, it will be investigated.</p>
<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-install &mdash; npm@1.4.28</p>
+<p id="footer">npm-install &mdash; npm@2.0.0</p>