From c1afa53648cf872f62b551e868522fdc2612e3a9 Mon Sep 17 00:00:00 2001
From: Forrest L Norvell
There's a pretty robust install script at https://www.npmjs.com/install.sh. You can download that and run it.
Here's an example using curl:
-curl -L https://www.npmjs.com/install.sh | sh
-
curl -L https://www.npmjs.com/install.sh | sh
+
+You can set any npm configuration params with that script:
-npm_config_prefix=/some/path sh install.sh
-
Or, you can run it in uber-debuggery mode:
-npm_debug=1 sh install.sh
-
npm_config_prefix=/some/path sh install.sh
+
+Or, you can run it in uber-debuggery mode:
+npm_debug=1 sh install.sh
+
+Get the code with git. Use make
to build the docs and do other stuff.
If you plan on hacking on npm, make link
is your friend.
If you've got the npm source code, you can also semi-permanently set @@ -57,10 +60,12 @@ git, and mess with it directly.
No.
So sad to see you go.
-sudo npm uninstall npm -g
-
Or, if that fails,
-sudo make uninstall
-
sudo npm uninstall npm -g
+
+Or, if that fails,
+sudo make uninstall
+
+Usually, the above instructions are sufficient. That will remove npm, but leave behind anything you've installed.
If you would like to remove all the packages that you have installed,
@@ -68,25 +73,33 @@ then you can use the npm ls
command to find them, and then np
remove them.
To remove cruft left behind by npm 0.x, you can use the included
clean-old.sh
script file. You can run it conveniently like this:
npm explore npm -g -- sh scripts/clean-old.sh
-
npm uses two configuration files, one for per-user configs, and another +
npm explore npm -g -- sh scripts/clean-old.sh
+
+npm uses two configuration files, one for per-user configs, and another for global (every-user) configs. You can view them by doing:
-npm config get userconfig # defaults to ~/.npmrc
+npm config get userconfig # defaults to ~/.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
-
Uninstalling npm does not remove configuration files by default. You
+
+Uninstalling npm does not remove configuration files by default. You must remove them yourself manually if you want them gone. Note that this means that future npm installs will not remember the settings that you have chosen.
If you would like to use npm programmatically, you can do that. -It's not very well documented, but it is rather simple.
-Most of the time, unless you actually want to do all the things that -npm does, you should try using one of npm's dependencies rather than -using npm itself, if possible.
-Eventually, npm will be just a thin cli wrapper around the modules -that it depends on, but for now, there are some things that you must -use npm itself to do.
-var npm = require("npm")
+Although npm can be used programmatically, its API is meant for use by the CLI
+only, and no guarantees are made regarding its fitness for any other purpose.
+If you want to use npm to reliably perform some task, the safest thing to do is
+to invoke the desired npm
command with appropriate arguments.
+The semantic version of npm refers to the CLI itself, rather than the
+underlying API. The internal API is not guaranteed to remain stable even when
+npm's version indicates no breaking changes have been made according to
+semver.
+If you still would like to use npm programmatically, it's possible. The API
+isn't very well documented, but it is rather simple.
+Eventually, npm will be just a thin CLI wrapper around the modules that it
+depends on, but for now, there are some things that only the CLI can do. You
+should try using one of npm's dependencies first, and only use the API if what
+you're trying to do is only supported by npm itself.
+var npm = require("npm")
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
npm.commands.install(["some", "args"], function (er, data) {
@@ -95,7 +108,8 @@ npm.load(myConfigObject, function (er) {
})
npm.registry.log.on("log", function (message) { .... })
})
-
The load
function takes an object hash of the command-line configs.
+
+The load
function takes an object hash of the command-line configs.
The various npm.commands.<cmd>
functions take an array of
positional argument strings. The last argument to any
npm.commands.<cmd>
function is a callback. Some commands take other
@@ -126,7 +140,7 @@ specific purpose, or lack of malice in any given npm package.
If you have a complaint about a package in the public npm registry, and cannot resolve it with the package owner, please email -support@npmjs.com and explain the situation.
+support@npmjs.com and explain the situation.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.
@@ -169,5 +183,5 @@ will no doubt tell you to put the output in a gist or email.npm.bin
property.
man 3 npm-<command>
for programmatic usage.
npm rebuild <pkg>
if you make any changes.
packages
parameter.
Add a package as a git submodule
+npm.commands.submodule(packages, callback)
+
For each package specified, npm will check if it has a git repository url
+in its package.json description then add it as a git submodule at
+node_modules/<pkg name>
.
This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
packages
parameter.
2.10.1
+2.11.0
This is the API documentation for npm.
To find documentation of the command line
@@ -109,5 +109,5 @@ method names. Use the npm.deref
method to find the real name.
package.json
in the current folder and use the name
v
.
name
property.
"notepad"
on Windows.
npm ls promzard
in npm's source tree will show:
-npm@2.10.1 /path/to/npm
+npm@2.11.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
It will print out extraneous, missing, and invalid packages.
@@ -97,5 +97,5 @@ project.
-
+
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index 8b1a867e0e..8194b87e77 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -67,5 +67,5 @@ project.
-
+
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index 70e8aeccdc..82f71f7e8c 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -49,5 +49,5 @@ that is not implemented at this time.
-
+
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index fa118a7388..fc0998b97c 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -41,5 +41,5 @@ overwritten the second time.
-
+
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index d01848a1c7..a8c8e7777b 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -38,5 +38,5 @@ to contain a package.json file unless -g
is also specified.
-
+
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 1fce2b556d..f277900cdd 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -39,5 +39,5 @@ packages specified in your devDependencies
.
-
+
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index c840ff41f7..990b686b5a 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -66,5 +66,5 @@ it is removed with
-
+
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index f4c8435c36..2b9a1bc00c 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -38,5 +38,5 @@ the new binary.
-
+
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 998986f916..9e9965a01c 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -42,5 +42,5 @@ a package.json
in the current folder and use the name
-
+
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index f291d5a7e1..d302bcedca 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number
-
+
diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html
index a67f89a1c2..21dc832e0f 100644
--- a/deps/npm/html/doc/cli/npm-rm.html
+++ b/deps/npm/html/doc/cli/npm-rm.html
@@ -39,5 +39,5 @@ on its behalf.
-
+
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index 5457c3fd9c..ba6a3c69cf 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -35,5 +35,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index 4d21c023b8..db4c9f55e9 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -56,5 +56,5 @@ you should write "scripts": {"test": "tap test/\*
-
+
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index d402ba4fe6..21e0399610 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -49,5 +49,5 @@ fall on multiple lines.
-
+
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 78b744222b..97aa961a26 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -18,14 +18,14 @@ that you can control exactly which versions of each dependency will be
used when your package is installed. The package.json
file is still
required if you want to use npm install
.
By default, npm install
recursively installs the target's
-dependencies (as specified in package.json), choosing the latest
+dependencies (as specified in package.json
), choosing the latest
available version that satisfies the dependency's semver pattern. In
some situations, particularly when shipping software where each change
is tightly managed, it's desirable to fully specify each version of
each dependency recursively so that subsequent builds and deploys do
not inadvertently pick up newer versions of a dependency that satisfy
the semver pattern. Specifying specific semver patterns in each
-dependency's package.json would facilitate this, but that's not always
+dependency's package.json
would facilitate this, but that's not always
possible or desirable, as when another author owns the npm package.
It's also possible to check dependencies directly into source control,
but that may be undesirable for other reasons.
@@ -47,7 +47,7 @@ but that may be undesirable for other reasons.
}
and package C:
{
- "name": "C,
+ "name": "C",
"version": "0.0.1"
}
If these are the only versions of A, B, and C available in the @@ -69,7 +69,7 @@ that he or she does not want to pull in newly published versions of C when B hasn't changed at all.
In this case, A's author can run
npm shrinkwrap
-
This generates npm-shrinkwrap.json, which will look something like this:
+This generates npm-shrinkwrap.json
, which will look something like this:
{
"name": "A",
"version": "0.1.0",
@@ -86,24 +86,24 @@ when B hasn't changed at all.
}
The shrinkwrap command has locked down the dependencies based on
what's currently installed in node_modules. When npm install
-installs a package with a npm-shrinkwrap.json file in the package
-root, the shrinkwrap file (rather than package.json files) completely
+installs a package with an npm-shrinkwrap.json
in the package
+root, the shrinkwrap file (rather than package.json
files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
installs of this package will use B@0.0.1 and C@0.0.1, regardless the
-dependencies and versions listed in A's, B's, and C's package.json
+dependencies and versions listed in A's, B's, and C's package.json
files.
Using a shrinkwrapped package is no different than using any other
package: you can npm install
it by hand, or add a dependency to your
-package.json file and npm install
it.
package.json
file and npm install
it.
To shrinkwrap an existing package:
npm install
in the package root to install the current
versions of all dependencies.npm shrinkwrap
, add npm-shrinkwrap.json to git, and publish
+npm shrinkwrap
, add npm-shrinkwrap.json
to git, and publish
your package.To add or update a dependency in a shrinkwrapped package:
@@ -111,24 +111,24 @@ your package.npm install
in the package root to install the current
versions of all dependencies.npm install
each new or updated
-package individually and then update package.json. Note that they
+package individually and then update package.json
. Note that they
must be explicitly named in order to be installed: running npm
install
with no arguments will merely reproduce the existing
shrinkwrap.npm shrinkwrap
, commit the new npm-shrinkwrap.json, and
+npm shrinkwrap
, commit the new npm-shrinkwrap.json
, and
publish your package.You can use npm-outdated(1) to view dependencies with newer versions available.
A shrinkwrap file must be consistent with the package's package.json +
A shrinkwrap file must be consistent with the package's package.json
file. npm shrinkwrap
will fail if required dependencies are not
already installed, since that would result in a shrinkwrap that
wouldn't actually work. Similarly, the command will fail if there are
-extraneous packages (not referenced by package.json), since that would
-indicate that package.json is not correct.
package.json
), since that would
+indicate that package.json
is not correct.
Since npm shrinkwrap
is intended to lock down your dependencies for
production use, devDependencies
will not be included unless you
explicitly set the --dev
flag when you run npm shrinkwrap
. If
@@ -164,5 +164,5 @@ contents rather than versions.
Add a package as a git submodule
+npm submodule <pkg>
+
If the specified package has a git repository url in its package.json
+description, then this command will add it as a git submodule at
+node_modules/<pkg name>
.
This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
v
.
If "preversion", "version", "postversion" in the "scripts" property of
+the package.json, it will execute by running npm version
. preversion
+and version ware executed before bump the package version, postversion
+was executed after bump the package version. For example to run npm version
+after passed all test:
"scripts": { "preversion": "npm test" }
npm <command> [args]
2.10.1
+2.11.0
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -110,7 +110,7 @@ easily by doing npm view npm contributors
.
When you find issues, please report them:
@@ -118,7 +118,7 @@ the issues list or ask on the mailing list.Be sure to include all of the output from the npm command that didn't work
as expected. The npm-debug.log
file is also helpful to provide.
Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me
+i@izs.me
-
+
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index 2ddeeddd50..fbfc4fbbc6 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -184,5 +184,5 @@ cannot be found elsewhere. See
-
+
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index c99da5c43a..35d1766479 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -538,5 +538,5 @@ ignored.
-
+
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index d113aed73b..85ecce5386 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -77,5 +77,5 @@ manner.
-
+
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index e914991e01..1fc1055992 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -538,5 +538,5 @@ ignored.
-
+
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index c62dd3509d..40510cb89a 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -236,5 +236,5 @@
-
+
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index 78646909c8..304e361b26 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -147,5 +147,5 @@ set to anything."
-
+
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index 086275a5b2..12936425a5 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -799,5 +799,5 @@ exit successfully.
-
+
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index a73ac2586a..11acb8b7d6 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -189,5 +189,5 @@ from a fresh checkout.
-
+
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index 7a395ce07a..905dce2ab8 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -13,7 +13,7 @@
SYNOPSIS
- Get the author email with
npm owner ls <pkgname>
-- Email the author, CC support@npmjs.com
+- Email the author, CC support@npmjs.com
- After a few weeks, if there's no resolution, we'll sort it out.
Don't squat on package names. Publish code or move out of the way.
@@ -51,12 +51,12 @@ Joe's appropriate course of action in each case is the same.
owner (Bob).
- Joe emails Bob, explaining the situation as respectfully as
possible, and what he would like to do with the module name. He
-adds the npm support staff support@npmjs.com to the CC list of
+adds the npm support staff support@npmjs.com to the CC list of
the email. Mention in the email that Bob can run
npm owner add
joe foo
to add Joe as an owner of the foo
package.
- After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can't come to any sort of resolution, email support
-support@npmjs.com and we'll sort it out. ("Reasonable" is
+support@npmjs.com and we'll sort it out. ("Reasonable" is
usually at least 4 weeks, but extra time is allowed around common
holidays.)
@@ -112,5 +112,5 @@ things into it.
-
+
diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html
index 3754a93a51..7abe589cff 100644
--- a/deps/npm/html/doc/misc/npm-faq.html
+++ b/deps/npm/html/doc/misc/npm-faq.html
@@ -236,7 +236,7 @@ that has a package.json in its root, or a git url.
To check if the registry is down, open up
https://registry.npmjs.org/ in a web browser. This will also tell
you if you are just unable to access the internet for some reason.
-If the registry IS down, let us know by emailing support@npmjs.com
+
If the registry IS down, let us know by emailing support@npmjs.com
or posting an issue at https://github.com/npm/npm/issues. If it's
down for the world (and not just on your local network) then we're
probably already being pinged about it.
@@ -244,19 +244,19 @@ probably already being pinged about it.
on Freenode IRC.
Why no namespaces?
npm has only one global namespace. If you want to namespace your own packages,
-you may: simply use the -
character to separate the names. npm is a mostly
-anarchic system. There is not sufficient need to impose namespace rules on
-everyone.
+you may: simply use the -
character to separate the names or use scoped
+packages. npm is a mostly anarchic system. There is not sufficient need to
+impose namespace rules on everyone.
As of 2.0, npm supports scoped packages, which allow you to publish a group of
related modules without worrying about name collisions.
Every npm user owns the scope associated with their username. For example, the
user named npm
owns the scope @npm
. Scoped packages are published inside a
scope by naming them as if they were files under the scope directory, e.g., by
setting name
in package.json
to @npm/npm
.
-Scoped packages can coexist with public npm packages in a private npm registry.
-At present (2014-11-04) scoped packages may NOT be published to the public npm
-registry.
-Unscoped packages can only depend on other unscoped packages. Scoped packages
+
Scoped packages are supported by the public npm registry. The npm client is
+backwards-compatible with un-scoped registries, so it can be used to work with
+scoped and un-scoped registries at the same time.
+Unscoped packages can only depend on other unscoped packages. Scoped packages
can depend on packages from their own scope, a different scope, or the public
registry (unscoped).
For the current documentation of scoped packages, see
@@ -307,5 +307,5 @@ good folks at npm, Inc.
-
+
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index 196fdae487..b6e379049e 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -236,5 +236,5 @@
-
+
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index 9c87ab42df..2e86625818 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -70,5 +70,5 @@ effectively implement the entire CouchDB API anyway.
-
+
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index cee696187c..6073eeada7 100644
--- a/deps/npm/html/doc/misc/npm-scope.html
+++ b/deps/npm/html/doc/misc/npm-scope.html
@@ -91,5 +91,5 @@ that registry instead.
-
+
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index 526459e30b..90d4ddea15 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -27,6 +27,10 @@ Run AFTER the package is installed.
Run BEFORE the package is uninstalled.
- postuninstall:
Run AFTER the package is uninstalled.
+- preversion, version:
+Run BEFORE bump the package version.
+- postversion:
+Run AFTER bump the package version.
- pretest, test, posttest:
Run by the
npm test
command.
- prestop, stop, poststop:
@@ -203,5 +207,5 @@ scripts is for compilation which must be done on the target architecture.
-
+
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index 21ce3c53b5..1d7328b768 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -57,5 +57,5 @@ modules. To track those down, you can do the following:
-
+
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index ab65a6dc3f..e09058a2c9 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -282,5 +282,5 @@ range, use the satisfies(version, range)
function.
-
+
diff --git a/deps/npm/html/partial/doc/README.html b/deps/npm/html/partial/doc/README.html
index 303ba9adc7..4c96624152 100644
--- a/deps/npm/html/partial/doc/README.html
+++ b/deps/npm/html/partial/doc/README.html
@@ -21,13 +21,16 @@ paths, etc.) then read on.
There's a pretty robust install script at
https://www.npmjs.com/install.sh. You can download that and run it.
Here's an example using curl:
-curl -L https://www.npmjs.com/install.sh | sh
-
Slightly Fancier
+curl -L https://www.npmjs.com/install.sh | sh
+
+Slightly Fancier
You can set any npm configuration params with that script:
-npm_config_prefix=/some/path sh install.sh
-
Or, you can run it in uber-debuggery mode:
-npm_debug=1 sh install.sh
-
Even Fancier
+npm_config_prefix=/some/path sh install.sh
+
+Or, you can run it in uber-debuggery mode:
+npm_debug=1 sh install.sh
+
+Even Fancier
Get the code with git. Use make
to build the docs and do other stuff.
If you plan on hacking on npm, make link
is your friend.
If you've got the npm source code, you can also semi-permanently set
@@ -46,10 +49,12 @@ git, and mess with it directly.
No.
Uninstalling
So sad to see you go.
-sudo npm uninstall npm -g
-
Or, if that fails,
-sudo make uninstall
-
More Severe Uninstalling
+sudo npm uninstall npm -g
+
+Or, if that fails,
+sudo make uninstall
+
+More Severe Uninstalling
Usually, the above instructions are sufficient. That will remove
npm, but leave behind anything you've installed.
If you would like to remove all the packages that you have installed,
@@ -57,25 +62,33 @@ then you can use the npm ls
command to find them, and then np
remove them.
To remove cruft left behind by npm 0.x, you can use the included
clean-old.sh
script file. You can run it conveniently like this:
-npm explore npm -g -- sh scripts/clean-old.sh
-
npm uses two configuration files, one for per-user configs, and another
+
npm explore npm -g -- sh scripts/clean-old.sh
+
+npm uses two configuration files, one for per-user configs, and another
for global (every-user) configs. You can view them by doing:
-npm config get userconfig # defaults to ~/.npmrc
+npm config get userconfig # defaults to ~/.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
-
Uninstalling npm does not remove configuration files by default. You
+
+Uninstalling npm does not remove configuration files by default. You
must remove them yourself manually if you want them gone. Note that
this means that future npm installs will not remember the settings that
you have chosen.
Using npm Programmatically
-If you would like to use npm programmatically, you can do that.
-It's not very well documented, but it is rather simple.
-Most of the time, unless you actually want to do all the things that
-npm does, you should try using one of npm's dependencies rather than
-using npm itself, if possible.
-Eventually, npm will be just a thin cli wrapper around the modules
-that it depends on, but for now, there are some things that you must
-use npm itself to do.
-var npm = require("npm")
+Although npm can be used programmatically, its API is meant for use by the CLI
+only, and no guarantees are made regarding its fitness for any other purpose.
+If you want to use npm to reliably perform some task, the safest thing to do is
+to invoke the desired npm
command with appropriate arguments.
+The semantic version of npm refers to the CLI itself, rather than the
+underlying API. The internal API is not guaranteed to remain stable even when
+npm's version indicates no breaking changes have been made according to
+semver.
+If you still would like to use npm programmatically, it's possible. The API
+isn't very well documented, but it is rather simple.
+Eventually, npm will be just a thin CLI wrapper around the modules that it
+depends on, but for now, there are some things that only the CLI can do. You
+should try using one of npm's dependencies first, and only use the API if what
+you're trying to do is only supported by npm itself.
+var npm = require("npm")
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
npm.commands.install(["some", "args"], function (er, data) {
@@ -84,7 +97,8 @@ npm.load(myConfigObject, function (er) {
})
npm.registry.log.on("log", function (message) { .... })
})
-
The load
function takes an object hash of the command-line configs.
+
+The load
function takes an object hash of the command-line configs.
The various npm.commands.<cmd>
functions take an array of
positional argument strings. The last argument to any
npm.commands.<cmd>
function is a callback. Some commands take other
@@ -115,7 +129,7 @@ specific purpose, or lack of malice in any given npm package.
If you have a complaint about a package in the public npm registry,
and cannot resolve it with the package
owner, please email
-support@npmjs.com and explain the situation.
+support@npmjs.com and explain the situation.
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.
diff --git a/deps/npm/html/partial/doc/api/npm-submodule.html b/deps/npm/html/partial/doc/api/npm-submodule.html
new file mode 100644
index 0000000000..cc7dd822ad
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-submodule.html
@@ -0,0 +1,21 @@
+npm-submodule
Add a package as a git submodule
+SYNOPSIS
+npm.commands.submodule(packages, callback)
+
DESCRIPTION
+For each package specified, npm will check if it has a git repository url
+in its package.json description then add it as a git submodule at
+node_modules/<pkg name>
.
+This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
+This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
+SEE ALSO
+
+- npm help json
+- git help submodule
+
diff --git a/deps/npm/html/partial/doc/api/npm.html b/deps/npm/html/partial/doc/api/npm.html
index 044a65624b..2f2b671b1d 100644
--- a/deps/npm/html/partial/doc/api/npm.html
+++ b/deps/npm/html/partial/doc/api/npm.html
@@ -12,7 +12,7 @@ npm.load([configObject, ]function (er, npm) {
npm.commands.install(["package"], cb)
})
VERSION
-2.10.1
+2.11.0
DESCRIPTION
This is the API documentation for npm.
To find documentation of the command line
diff --git a/deps/npm/html/partial/doc/cli/npm-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html
index 448aae4d11..be257c5445 100644
--- a/deps/npm/html/partial/doc/cli/npm-ls.html
+++ b/deps/npm/html/partial/doc/cli/npm-ls.html
@@ -11,7 +11,7 @@ installed, as well as their dependencies, in a tree-structure.
limit the results to only the paths to the packages named. Note that
nested packages will also show the paths to the specified packages.
For example, running npm ls promzard
in npm's source tree will show:
-npm@2.10.1 /path/to/npm
+npm@2.11.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
It will print out extraneous, missing, and invalid packages.
diff --git a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
index 7857cf85ee..8ac97fc3ee 100644
--- a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
@@ -7,14 +7,14 @@ that you can control exactly which versions of each dependency will be
used when your package is installed. The package.json
file is still
required if you want to use npm install
.
By default, npm install
recursively installs the target's
-dependencies (as specified in package.json), choosing the latest
+dependencies (as specified in package.json
), choosing the latest
available version that satisfies the dependency's semver pattern. In
some situations, particularly when shipping software where each change
is tightly managed, it's desirable to fully specify each version of
each dependency recursively so that subsequent builds and deploys do
not inadvertently pick up newer versions of a dependency that satisfy
the semver pattern. Specifying specific semver patterns in each
-dependency's package.json would facilitate this, but that's not always
+dependency's package.json
would facilitate this, but that's not always
possible or desirable, as when another author owns the npm package.
It's also possible to check dependencies directly into source control,
but that may be undesirable for other reasons.
@@ -36,7 +36,7 @@ but that may be undesirable for other reasons.
}
and package C:
{
- "name": "C,
+ "name": "C",
"version": "0.0.1"
}
If these are the only versions of A, B, and C available in the
@@ -58,7 +58,7 @@ that he or she does not want to pull in newly published versions of C
when B hasn't changed at all.
In this case, A's author can run
npm shrinkwrap
-
This generates npm-shrinkwrap.json, which will look something like this:
+
This generates npm-shrinkwrap.json
, which will look something like this:
{
"name": "A",
"version": "0.1.0",
@@ -75,24 +75,24 @@ when B hasn't changed at all.
}
The shrinkwrap command has locked down the dependencies based on
what's currently installed in node_modules. When npm install
-installs a package with a npm-shrinkwrap.json file in the package
-root, the shrinkwrap file (rather than package.json files) completely
+installs a package with an npm-shrinkwrap.json
in the package
+root, the shrinkwrap file (rather than package.json
files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
installs of this package will use B@0.0.1 and C@0.0.1, regardless the
-dependencies and versions listed in A's, B's, and C's package.json
+dependencies and versions listed in A's, B's, and C's package.json
files.
Using a shrinkwrapped package is no different than using any other
package: you can npm install
it by hand, or add a dependency to your
-package.json file and npm install
it.
package.json
file and npm install
it.
To shrinkwrap an existing package:
npm install
in the package root to install the current
versions of all dependencies.npm shrinkwrap
, add npm-shrinkwrap.json to git, and publish
+npm shrinkwrap
, add npm-shrinkwrap.json
to git, and publish
your package.To add or update a dependency in a shrinkwrapped package:
@@ -100,24 +100,24 @@ your package.npm install
in the package root to install the current
versions of all dependencies.npm install
each new or updated
-package individually and then update package.json. Note that they
+package individually and then update package.json
. Note that they
must be explicitly named in order to be installed: running npm
install
with no arguments will merely reproduce the existing
shrinkwrap.npm shrinkwrap
, commit the new npm-shrinkwrap.json, and
+npm shrinkwrap
, commit the new npm-shrinkwrap.json
, and
publish your package.You can use npm-outdated(1) to view dependencies with newer versions available.
A shrinkwrap file must be consistent with the package's package.json +
A shrinkwrap file must be consistent with the package's package.json
file. npm shrinkwrap
will fail if required dependencies are not
already installed, since that would result in a shrinkwrap that
wouldn't actually work. Similarly, the command will fail if there are
-extraneous packages (not referenced by package.json), since that would
-indicate that package.json is not correct.
package.json
), since that would
+indicate that package.json
is not correct.
Since npm shrinkwrap
is intended to lock down your dependencies for
production use, devDependencies
will not be included unless you
explicitly set the --dev
flag when you run npm shrinkwrap
. If
diff --git a/deps/npm/html/partial/doc/cli/npm-submodule.html b/deps/npm/html/partial/doc/cli/npm-submodule.html
new file mode 100644
index 0000000000..dd7c7e8878
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-submodule.html
@@ -0,0 +1,21 @@
+
Add a package as a git submodule
+npm submodule <pkg>
+
If the specified package has a git repository url in its package.json
+description, then this command will add it as a git submodule at
+node_modules/<pkg name>
.
This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
If "preversion", "version", "postversion" in the "scripts" property of
+the package.json, it will execute by running npm version
. preversion
+and version ware executed before bump the package version, postversion
+was executed after bump the package version. For example to run npm version
+after passed all test:
"scripts": { "preversion": "npm test" }
npm <command> [args]
2.10.1
+2.11.0
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,7 +99,7 @@ easily by doing npm view npm contributors
.
When you find issues, please report them:
@@ -107,7 +107,7 @@ the issues list or ask on the mailing list.Be sure to include all of the output from the npm command that didn't work
as expected. The npm-debug.log
file is also helpful to provide.
Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me
+i@izs.menpm owner ls <pkgname>
Don't squat on package names. Publish code or move out of the way.
@@ -40,12 +40,12 @@ Joe's appropriate course of action in each case is the same. owner (Bob).npm owner add
joe foo
to add Joe as an owner of the foo
package.To check if the registry is down, open up https://registry.npmjs.org/ in a web browser. This will also tell you if you are just unable to access the internet for some reason.
-If the registry IS down, let us know by emailing support@npmjs.com +
If the registry IS down, let us know by emailing support@npmjs.com or posting an issue at https://github.com/npm/npm/issues. If it's down for the world (and not just on your local network) then we're probably already being pinged about it.
@@ -233,19 +233,19 @@ probably already being pinged about it. on Freenode IRC.npm has only one global namespace. If you want to namespace your own packages,
-you may: simply use the -
character to separate the names. npm is a mostly
-anarchic system. There is not sufficient need to impose namespace rules on
-everyone.
-
character to separate the names or use scoped
+packages. npm is a mostly anarchic system. There is not sufficient need to
+impose namespace rules on everyone.
As of 2.0, npm supports scoped packages, which allow you to publish a group of related modules without worrying about name collisions.
Every npm user owns the scope associated with their username. For example, the
user named npm
owns the scope @npm
. Scoped packages are published inside a
scope by naming them as if they were files under the scope directory, e.g., by
setting name
in package.json
to @npm/npm
.
Scoped packages can coexist with public npm packages in a private npm registry. -At present (2014-11-04) scoped packages may NOT be published to the public npm -registry.
-Unscoped packages can only depend on other unscoped packages. Scoped packages +
Scoped packages are supported by the public npm registry. The npm client is +backwards-compatible with un-scoped registries, so it can be used to work with +scoped and un-scoped registries at the same time.
+Unscoped packages can only depend on other unscoped packages. Scoped packages can depend on packages from their own scope, a different scope, or the public registry (unscoped).
For the current documentation of scoped packages, see diff --git a/deps/npm/html/partial/doc/misc/npm-scripts.html b/deps/npm/html/partial/doc/misc/npm-scripts.html index 8a152f3ef1..f4ce3221a3 100644 --- a/deps/npm/html/partial/doc/misc/npm-scripts.html +++ b/deps/npm/html/partial/doc/misc/npm-scripts.html @@ -16,6 +16,10 @@ Run AFTER the package is installed. Run BEFORE the package is uninstalled.
npm test
command.