diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-09-24 14:41:07 -0700 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-09-24 17:15:10 -0700 |
commit | 9fad8958df671c0e894506ef59b4c781c3dfb349 (patch) | |
tree | 4db7643b40c4ffd726fb27fb4aa276d420b3bfd8 /deps/npm/html/doc/cli/npm-install.html | |
parent | b26dd4e5ab9192bad72b9dc61fa4ad2d8f215da2 (diff) | |
download | node-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.html | 41 |
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 <tarball file> npm install <tarball url> npm install <folder> -npm install <name> [--save|--save-dev|--save-optional] [--save-exact] -npm install <name>@<tag> -npm install <name>@<version> -npm install <name>@<version range> +npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact] +npm install [@<scope>/]<name>@<tag> +npm install [@<scope>/]<name>@<version> +npm install [@<scope>/]<name>@<version range> 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 <name> [--save|--save-dev|--save-optional]</code>:</p> +<li><p><code>npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]</code>:</p> <p> Do a <code><name>@<tag></code> install, where <code><tag></code> is the "tag" 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's default semver range operator.</p> +<p><code><scope></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 <name>@<tag></code>:</p> +<li><p><code>npm install [@<scope>/]<name>@<tag></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 <name>@<version></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 [@<scope>/]<name>@<version></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 <name>@<version range></code>:</p> +<li><p><code>npm install [@<scope>/]<name>@<version range></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@">=0.1.0 <0.2.0" + npm install @myorg/privatepackage@">=0.1.0 <0.2.0" </code></pre></li> +<li><p><code>npm install <githubname>/<githubrepo></code>:</p> +<p> Install the package at <code>https://github.com/githubname/githubrepo" 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 <git remote url></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> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-install — npm@1.4.28</p> +<p id="footer">npm-install — npm@2.0.0</p> |