Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-07-18 23:55:52 +0300
committerMichaël Zasso <targos@protonmail.com>2018-07-29 15:16:56 +0300
commit5842366ae83a36065d626e3937ad8fc327efab30 (patch)
tree663eb6d493b00788d83d7a71fc2489adabd24527 /deps/npm/html/doc/cli/npm-install.html
parent2aca0957f46af0be33368a1fcb398e63a35c46ef (diff)
deps: upgrade npm to 6.2.0
PR-URL: https://github.com/nodejs/node/pull/21592 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/npm/html/doc/cli/npm-install.html')
-rw-r--r--deps/npm/html/doc/cli/npm-install.html89
1 files changed, 37 insertions, 52 deletions
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 5bc9cd985bf..39ee8ce902c 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -23,8 +23,7 @@ npm install &lt;tarball url&gt;
npm install &lt;folder&gt;
alias: npm i
-common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
-</code></pre><h2 id="description">DESCRIPTION</h2>
+common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command installs a package, and any packages that it depends on. If the
package has a package-lock or shrinkwrap file, the installation of dependencies
will be driven by that, with an <code>npm-shrinkwrap.json</code> taking precedence if both
@@ -68,31 +67,34 @@ after packing it up into a tarball (b).</p>
<li><p><code>npm install &lt;tarball file&gt;</code>:</p>
<p> Install a package that is sitting on the filesystem. Note: if you just want
to link a dev directory into your npm root, you can do this more easily by
- using <code>npm link</code>. The filename <em>must</em> use <code>.tar</code>, <code>.tar.gz</code>, or <code>.tgz</code> as
- the extension.</p>
-<p> Example:</p>
-<pre><code> npm install ./package.tgz
-</code></pre></li>
+ using <code>npm link</code>.</p>
+<p> Tarball requirements:</p>
+<ul>
+<li>The filename <em>must</em> use <code>.tar</code>, <code>.tar.gz</code>, or <code>.tgz</code> as
+the extension.</li>
+<li>The package contents should reside in a subfolder inside the tarball (usually it is called <code>package/</code>). npm strips one directory layer when installing the package (an equivalent of <code>tar x --strip-components=1</code> is run).</li>
+<li><p>The package must contain a <code>package.json</code> file with <code>name</code> and <code>version</code> properties.</p>
+<p>Example:</p>
+<pre><code>npm install ./package.tgz</code></pre></li>
+</ul>
+</li>
<li><p><code>npm install &lt;tarball url&gt;</code>:</p>
<p> Fetch the tarball url, and then install it. In order to distinguish between
this and other options, the argument must start with &quot;http://&quot; or &quot;https://&quot;</p>
<p> Example:</p>
-<pre><code> npm install https://github.com/indexzero/forever/tarball/v0.5.6
-</code></pre></li>
+<pre><code> npm install https://github.com/indexzero/forever/tarball/v0.5.6</code></pre></li>
<li><p><code>npm install [&lt;@scope&gt;/]&lt;name&gt;</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>. The config&#39;s default value is <code>latest</code>.)</p>
<p> In most cases, this will install the version of the modules tagged as
<code>latest</code> on the npm registry.</p>
<p> Example:</p>
-<pre><code> npm install sax
-</code></pre><p> <code>npm install</code> saves any specified packages into <code>dependencies</code> by default.
+<pre><code> npm install sax</code></pre><p> <code>npm install</code> saves any specified packages into <code>dependencies</code> by default.
Additionally, you can control where and how they get saved with some
additional flags:</p>
<ul>
<li><p><code>-P, --save-prod</code>: Package will appear in your <code>dependencies</code>. This is the</p>
-<pre><code> default unless `-D` or `-O` are present.
-</code></pre></li>
+<pre><code> default unless `-D` or `-O` are present.</code></pre></li>
<li><p><code>-D, --save-dev</code>: Package will appear in your <code>devDependencies</code>.</p>
</li>
<li><p><code>-O, --save-optional</code>: Package will appear in your <code>optionalDependencies</code>.</p>
@@ -121,30 +123,26 @@ npm install @myorg/privatepackage
npm install node-tap --save-dev
npm install dtrace-provider --save-optional
npm install readable-stream --save-exact
-npm install ansi-regex --save-bundle
-</code></pre></li>
+npm install ansi-regex --save-bundle</code></pre></li>
</ul>
</li>
</ul>
<pre><code>**Note**: If there is a file or folder named `&lt;name&gt;` in the current
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>
+fetch the package by name if it is not valid.</code></pre><ul>
<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>
+ npm install @myorg/mypackage@latest</code></pre></li>
<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>
+ npm install @myorg/privatepackage@1.5.0</code></pre></li>
<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>
@@ -152,13 +150,11 @@ fetch the package by name if it is not valid.
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>
+ npm install @myorg/privatepackage@&quot;&gt;=0.1.0 &lt;0.2.0&quot;</code></pre></li>
<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
<p> Installs the package from the hosted git provider, cloning it with <code>git</code>.
For a full git remote url, only that URL will be attempted.</p>
-<pre><code> &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;[:&lt;port&gt;][:][/]&lt;path&gt;[#&lt;commit-ish&gt; | #semver:&lt;semver&gt;]
-</code></pre><p> <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, <code>git+https</code>, or
+<pre><code> &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;[:&lt;port&gt;][:][/]&lt;path&gt;[#&lt;commit-ish&gt; | #semver:&lt;semver&gt;]</code></pre><p> <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, <code>git+https</code>, or
<code>git+file</code>.</p>
<p> If <code>#&lt;commit-ish&gt;</code> is provided, it will be used to clone exactly that
commit. If the commit-ish has the format <code>#semver:&lt;semver&gt;</code>, <code>&lt;semver&gt;</code> can
@@ -183,12 +179,11 @@ fetch the package by name if it is not valid.
<li><p><code>GIT_SSL_NO_VERIFY</code></p>
<p>See the git man page for details.</p>
<p>Examples:</p>
-<pre><code>npm install git+ssh://git@github.com:npm/npm.git#v1.0.27
-npm install git+ssh://git@github.com:npm/npm#semver:^5.0
-npm install git+https://isaacs@github.com/npm/npm.git
-npm install git://github.com/npm/npm.git#v1.0.27
-GIT_SSH_COMMAND=&#39;ssh -i ~/.ssh/custom_ident&#39; npm install git+ssh://git@github.com:npm/npm.git
-</code></pre></li>
+<pre><code>npm install git+ssh://git@github.com:npm/cli.git#v1.0.27
+npm install git+ssh://git@github.com:npm/cli#semver:^5.0
+npm install git+https://isaacs@github.com/npm/cli.git
+npm install git://github.com/npm/cli.git#v1.0.27
+GIT_SSH_COMMAND=&#39;ssh -i ~/.ssh/custom_ident&#39; npm install git+ssh://git@github.com:npm/cli.git</code></pre></li>
</ul>
</li>
<li><p><code>npm install &lt;githubname&gt;/&lt;githubrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
@@ -207,8 +202,7 @@ GIT_SSH_COMMAND=&#39;ssh -i ~/.ssh/custom_ident&#39; npm install git+ssh://git@g
done installing.</p>
<p> Examples:</p>
<pre><code> npm install mygithubuser/myproject
- npm install github:mygithubuser/myproject
-</code></pre></li>
+ npm install github:mygithubuser/myproject</code></pre></li>
<li><p><code>npm install gist:[&lt;githubname&gt;/]&lt;gistID&gt;[#&lt;commit-ish&gt;|#semver:&lt;semver&gt;]</code>:</p>
<p> Install the package at <code>https://gist.github.com/gistID</code> by attempting to
clone it using <code>git</code>. The GitHub username associated with the gist is
@@ -217,8 +211,7 @@ GIT_SSH_COMMAND=&#39;ssh -i ~/.ssh/custom_ident&#39; npm install git+ssh://git@g
be installed if the package has a <code>prepare</code> script, before the package is
done installing.</p>
<p> Example:</p>
-<pre><code> npm install gist:101a11beef
-</code></pre></li>
+<pre><code> npm install gist:101a11beef</code></pre></li>
<li><p><code>npm install bitbucket:&lt;bitbucketname&gt;/&lt;bitbucketrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
<p> Install the package at <code>https://bitbucket.org/bitbucketname/bitbucketrepo</code>
by attempting to clone it using <code>git</code>.</p>
@@ -232,8 +225,7 @@ GIT_SSH_COMMAND=&#39;ssh -i ~/.ssh/custom_ident&#39; npm install git+ssh://git@g
be installed if the package has a <code>prepare</code> script, before the package is
done installing.</p>
<p> Example:</p>
-<pre><code> npm install bitbucket:mybitbucketuser/myproject
-</code></pre></li>
+<pre><code> npm install bitbucket:mybitbucketuser/myproject</code></pre></li>
<li><p><code>npm install gitlab:&lt;gitlabname&gt;/&lt;gitlabrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
<p> Install the package at <code>https://gitlab.com/gitlabname/gitlabrepo</code>
by attempting to clone it using <code>git</code>.</p>
@@ -248,13 +240,11 @@ GIT_SSH_COMMAND=&#39;ssh -i ~/.ssh/custom_ident&#39; npm install git+ssh://git@g
done installing.</p>
<p> Example:</p>
<pre><code> npm install gitlab:mygitlabuser/myproject
- npm install gitlab:myusr/myproj#semver:^5.0
-</code></pre></li>
+ npm install gitlab:myusr/myproj#semver:^5.0</code></pre></li>
</ul>
<p>You may combine multiple arguments, and even multiple types of arguments.
For example:</p>
-<pre><code>npm install sax@&quot;&gt;=0.1.0 &lt;0.2.0&quot; bench supervisor
-</code></pre><p>The <code>--tag</code> argument will apply to all of the specified install targets. If a
+<pre><code>npm install sax@&quot;&gt;=0.1.0 &lt;0.2.0&quot; bench supervisor</code></pre><p>The <code>--tag</code> argument will apply to all of the specified install targets. If a
tag with the given name exists, the tagged version is preferred over newer
versions.</p>
<p>The <code>--dry-run</code> argument will report in the usual way what the install would
@@ -263,8 +253,7 @@ have done without actually installing anything.</p>
instead of checking <code>node_modules</code> and downloading dependencies.</p>
<p>The <code>-f</code> or <code>--force</code> argument will force npm to fetch remote resources even if a
local copy exists on disk.</p>
-<pre><code>npm install sax --force
-</code></pre><p>The <code>-g</code> or <code>--global</code> argument will cause npm to install the package globally
+<pre><code>npm install sax --force</code></pre><p>The <code>-g</code> or <code>--global</code> argument will cause npm to install the package globally
rather than locally. See <code><a href="../files/npm-folders.html">npm-folders(5)</a></code>.</p>
<p>The <code>--global-style</code> argument will cause npm to install the package into
your local <code>node_modules</code> folder with the same layout it uses with the
@@ -306,14 +295,12 @@ walk the clone and add any missing dependencies
compare the original tree with the cloned tree and make a list of
actions to take to convert one to the other
execute all of the actions, deepest first
- kinds of actions are install, update, remove and move
-</code></pre><p>For this <code>package{dep}</code> structure: <code>A{B,C}, B{C}, C{D}</code>,
+ kinds of actions are install, update, remove and move</code></pre><p>For this <code>package{dep}</code> structure: <code>A{B,C}, B{C}, C{D}</code>,
this algorithm produces:</p>
<pre><code>A
+-- B
+-- C
-+-- D
-</code></pre><p>That is, the dependency from B to C is satisfied by the fact that A
++-- D</code></pre><p>That is, the dependency from B to C is satisfied by the fact that A
already caused C to be installed at a higher level. D is still installed
at the top level because nothing conflicts with it.</p>
<p>For <code>A{B,C}, B{C,D@1}, C{D@2}</code>, this algorithm produces:</p>
@@ -321,8 +308,7 @@ at the top level because nothing conflicts with it.</p>
+-- B
+-- C
`-- D@2
-+-- D@1
-</code></pre><p>Because B&#39;s D@1 will be installed in the top level, C now has to install D@2
++-- D@1</code></pre><p>Because B&#39;s D@1 will be installed in the top level, C now has to install D@2
privately for itself. This algorithm is deterministic, but different trees may
be produced if two dependencies are requested for installation in a different
order.</p>
@@ -335,8 +321,7 @@ most cases can simply be addressed by changing the local package name.</p>
<p>There are some very rare and pathological edge-cases where a cycle can
cause npm to try to install a never-ending tree of packages. Here is
the simplest case:</p>
-<pre><code>A -&gt; B -&gt; A&#39; -&gt; B&#39; -&gt; A -&gt; B -&gt; A&#39; -&gt; B&#39; -&gt; A -&gt; ...
-</code></pre><p>where <code>A</code> is some version of a package, and <code>A&#39;</code> is a different version
+<pre><code>A -&gt; B -&gt; A&#39; -&gt; B&#39; -&gt; A -&gt; B -&gt; A&#39; -&gt; B&#39; -&gt; A -&gt; ...</code></pre><p>where <code>A</code> is some version of a package, and <code>A&#39;</code> is a different version
of the same package. Because <code>B</code> depends on a different version of <code>A</code>
than the one that is already in the tree, it must install a separate
copy. The same is true of <code>A&#39;</code>, which must install <code>B&#39;</code>. Because <code>B&#39;</code>
@@ -377,5 +362,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@6.1.0</p>
+<p id="footer">npm-install &mdash; npm@6.2.0</p>