diff options
author | Rebecca Turner <me@re-becca.org> | 2015-10-09 23:13:57 -0700 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2015-10-22 13:56:09 -0400 |
commit | 41923c0c0795cfa6c465821387fca88fe8811367 (patch) | |
tree | 853587bc888fde98f714d72050edceb4785145de /deps/npm/man/man1/npm-install.1 | |
parent | 9b8886446dd183cee26adf9c603f8e1cd5da74bd (diff) | |
download | android-node-v8-41923c0c0795cfa6c465821387fca88fe8811367.tar.gz android-node-v8-41923c0c0795cfa6c465821387fca88fe8811367.tar.bz2 android-node-v8-41923c0c0795cfa6c465821387fca88fe8811367.zip |
deps: upgrade npm to 3.3.6
PR-URL: https://github.com/nodejs/node/pull/3310
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/man/man1/npm-install.1')
-rw-r--r-- | deps/npm/man/man1/npm-install.1 | 79 |
1 files changed, 53 insertions, 26 deletions
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index c135dfb4a3..8e78558ba4 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -5,15 +5,17 @@ .P .RS 2 .nf -npm install (with no args in a package dir) +npm install (with no args, in package dir) +npm install [<@scope>/]<name> +npm install [<@scope>/]<name>@<tag> +npm install [<@scope>/]<name>@<version> +npm install [<@scope>/]<name>@<version range> npm install <tarball file> npm install <tarball url> npm install <folder> -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) + +alias: npm i +common options: [\-\-save|\-\-save\-dev|\-\-save\-optional] [\-\-save\-exact] [\-\-dry\-run] .fi .RE .SH DESCRIPTION @@ -37,7 +39,7 @@ e) a \fB<name>@<tag>\fP that points to (d) .IP \(bu 2 f) a \fB<name>\fP that has a "latest" tag satisfying (e) .IP \(bu 2 -g) a \fB<git remote url>\fP that resolves to (b) +g) a \fB<git remote url>\fP that resolves to (a) .RE .P @@ -83,7 +85,7 @@ after packing it up into a tarball (b)\. .fi .RE .IP \(bu 2 -\fBnpm install [@<scope>/]<name> [\-\-save|\-\-save\-dev|\-\-save\-optional]\fP: +\fBnpm install [<@scope>/]<name> [\-\-save|\-\-save\-dev|\-\-save\-optional]\fP: Do a \fB<name>@<tag>\fP install, where \fB<tag>\fP is the "tag" config\. (See npm help 7 \fBnpm\-config\fP\|\.) In most cases, this will install the latest version @@ -110,6 +112,8 @@ package\.json, there is an additional, optional flag: \fB\-\-save\-exact\fP: Saved dependencies will be configured with an exact version rather than using npm's default semver range operator\. +Further, if you have an \fBnpm\-shrinkwrap\.json\fP then it will be updated as +well\. \fB<scope>\fP 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 npm help 7 \fBnpm\-scope\fP\|\. @@ -142,7 +146,7 @@ fetch the package by name if it is not valid\. .RE .RS 0 .IP \(bu 2 -\fBnpm install [@<scope>/]<name>@<tag>\fP: +\fBnpm install [<@scope>/]<name>@<tag>\fP: 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\. @@ -155,7 +159,7 @@ fetch the package by name if it is not valid\. .fi .RE .IP \(bu 2 -\fBnpm install [@<scope>/]<name>@<version>\fP: +\fBnpm install [<@scope>/]<name>@<version>\fP: Install the specified version of the package\. This will fail if the version has not been published to the registry\. Example: @@ -167,7 +171,7 @@ fetch the package by name if it is not valid\. .fi .RE .IP \(bu 2 -\fBnpm install [@<scope>/]<name>@<version range>\fP: +\fBnpm install [<@scope>/]<name>@<version range>\fP: Install a version of the package matching the specified version range\. This will follow the same rules for resolving dependencies described in npm help 5 \fBpackage\.json\fP\|\. Note that most version ranges must be put in quotes so that your shell will @@ -182,12 +186,12 @@ fetch the package by name if it is not valid\. .RE .IP \(bu 2 \fBnpm install <git remote url>\fP: - Install a package by cloning a git remote url\. The format of the git - url is: + Installs the package from the hosted git provider, cloning it with + \fBgit\fP\|\. First it tries via the https (git with github) and if that fails, via ssh\. .P .RS 2 .nf - <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit\-ish>] + <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit\-ish>] .fi .RE \fB<protocol>\fP is one of \fBgit\fP, \fBgit+ssh\fP, \fBgit+http\fP, or @@ -289,6 +293,9 @@ The \fB\-\-tag\fP argument will apply to all of the specified install targets\. tag with the given name exists, the tagged version is preferred over newer versions\. .P +The \fB\-\-dry\-run\fP argument will report in the usual way what the install would +have done without actually installing anything\. +.P The \fB\-\-force\fP argument will force npm to fetch remote resources even if a local copy exists on disk\. .P @@ -316,6 +323,9 @@ shrinkwrap file and use the package\.json instead\. The \fB\-\-nodedir=/path/to/node/source\fP argument will allow npm to find the node source code so that npm can compile native modules\. .P +The \fB\-\-only={prod[uction]|dev[elopment]}\fP argument will cause either only +\fBdevDependencies\fP or only non\-\fBdevDependencies\fP to be installed\. +.P See npm help 7 \fBnpm\-config\fP\|\. Many of the configuration params have some effect on installation, since that's most of what npm does\. .SH ALGORITHM @@ -324,15 +334,16 @@ To install a package, npm uses the following algorithm: .P .RS 2 .nf -install(where, what, family, ancestors) -fetch what, unpack to <where>/node_modules/<what> -for each dep in what\.dependencies - resolve dep to precise version -for each dep@version in what\.dependencies - not in <where>/node_modules/<what>/node_modules/* - and not in <family> - add precise version deps to <family> - install(<where>/node_modules/<what>, dep, family) +load the existing node_modules tree from disk +clone the tree +fetch the package\.json and assorted metadata and add it to the clone +walk the clone and add any missing dependencies + dependencies will be added as close to the top as is possible + without breaking any other modules +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 .fi .RE .P @@ -343,13 +354,29 @@ this algorithm produces: .nf A +\-\- B -`\-\- C - `\-\- D ++\-\- C ++\-\- D .fi .RE .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\. +already caused C to be installed at a higher level\. D is still installed +at the top level because nothing conflicts with it\. +.P +For \fBA{B,C}, B{C,D@1}, C{D@2}\fP, this algorithm produces: +.P +.RS 2 +.nf +A ++\-\- B ++\-\- C + `\-\- D@2 ++\-\- D@1 +.fi +.RE +.P +Because B's D@1 will be installed in the top leve, C now has to install D@2 +privately for itself\. .P See npm help 5 folders for a more detailed description of the specific folder structures that npm creates\. |