Permalink
Browse files

Documentation for 1.0

  • Loading branch information...
1 parent b222a0a commit c178365094bcb99250fd85c9fc1de541ccbf541a @isaacs isaacs committed Mar 21, 2011
Showing with 573 additions and 917 deletions.
  1. +4 −18 doc/adduser.md
  2. +1 −0 doc/author.md
  3. +2 −8 doc/build.md
  4. +26 −23 doc/cache.md
  5. +28 −230 doc/changelog.md
  6. +11 −14 doc/completion.md
  7. +224 −177 doc/config.md
  8. +0 −9 doc/deprecate.md
  9. +1 −3 doc/docs.md
  10. +3 −15 doc/edit.md
  11. +20 −26 doc/faq.md
  12. +133 −51 doc/folders.md
  13. +13 −87 doc/install.md
  14. +4 −0 doc/json.md
  15. +21 −16 doc/link.md
  16. +15 −49 doc/list.md
  17. +3 −4 doc/npm.md
  18. +0 −28 doc/outdated.md
  19. +0 −32 doc/owner.md
  20. +10 −0 doc/prefix.md
  21. +15 −0 doc/prune.md
  22. +1 −9 doc/publish.md
  23. +1 −7 doc/rebuild.md
  24. +2 −45 doc/registry.md
  25. +1 −1 doc/restart.md
  26. +10 −0 doc/root.md
  27. +1 −3 doc/run-script.md
  28. +0 −20 doc/scripts.md
  29. +0 −1 doc/search.md
  30. +10 −0 doc/search.md
  31. +1 −3 doc/start.md
  32. +1 −3 doc/stop.md
  33. +3 −6 doc/tag.md
  34. +3 −2 doc/test.md
  35. +3 −15 doc/uninstall.md
  36. +2 −12 doc/update.md
View
@@ -10,34 +10,20 @@ npm-adduser(1) -- Add a registry user account
Create or verify a user named `<username>` in the npm registry, and
save the credentials to the `.npmrc` file.
-The username, password, and email are read in from prompts. This command
-cannot be scripted. If you think you need to script the creation of new
-users, or the authorization of existing ones, without human intervention,
-please rethink your use case. That's a very bad idea.
+The username, password, and email are read in from prompts.
You may use this command to change your email address, but not username
or password.
+To reset your password, go to <http://admin.npmjs.org/>
+
You may use this command multiple times with the same user account to
authorize on a new machine.
## CONFIGURATION
-### _auth
-
-A base-64 encoded "user:pass" pair. This is created by npm-adduser(1).
-
-If your config file is ever corrupted, you can set this manually by doing:
-
- npm adduser
-
### registry
-Default: https://registry.npmjs.org/
+Default: http://registry.npmjs.org/
The base URL of the npm package registry.
-
-### username, _password
-
-Once the configuration is parsed, the `_auth` config is split into
-`username` and `_password`. This is the part before the ":"
View
View
@@ -10,15 +10,9 @@ npm-build(1) -- Build a package
## DESCRIPTION
-This command should almost never need to be run directly. It is an abstraction
-of the functionality shared by both npm-install(1) and npm-link(1).
-
-This command creates the various interwoven links that ensure a package's contents
-are available in the root appropriately, and that its dependencies are linked
-appropriately.
-
-## CONFIGURATION
+This is the plumbing command called by `npm link` and `npm install`.
+It should generally not be called directly.
## SEE ALSO
View
@@ -10,48 +10,51 @@ npm-cache(1) -- install a package
npm cache ls [<path>]
- npm cache clean [<name>[@<version>]]
+ npm cache clean [<path>]
## DESCRIPTION
* add:
- Access the local cache of package data. This command is primarily
+ Add the specified package to the local cache. This command is primarily
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly.
- If two arguments are provided, then npm will fetch the data from the
- registry. This allows npm to use the filesystem as a local proxy to
- the registry.
-
* ls:
- Show the data in the cache. Additional arguments are joined together
- in a path-like fashion, but something like `npm cache ls npm/0.1.5` is
- acceptable as well.
+ Show the data in the cache. Argument is a path to show in the cache
+ folder. Works a bit like the `find` program, but limited by the
+ `depth` config.
* clean:
- Delete data out of the cache for a specific package and version, all
- versions of a package, or all data for all packages, depending on the
- arguments supplied.
-
- This can be used if invalid data gets into the cache.
+ Delete data out of the cache folder. If an argument is provided, then
+ it specifies a subpath to delete. If no argument is provided, then
+ the entire cache is cleared.
## DETAILS
-npm stores data for a version of a package in
-`$ROOT/.npm/.cache/<name>/<version>`. Three pieces of data are stored
-in this folder:
+npm stores cache data in `$HOME/.npm`. For each package that is added
+to the cache, three pieces of information are stored in
+`{cache}/{name}/{version}`:
-* package/:
+* .../package/:
A folder containing the package contents as they appear in the tarball.
-* package.json:
+* .../package.json:
The package.json file, as npm sees it, with overlays applied and a _id attribute.
-* package.tgz:
+* .../package.tgz:
The tarball for that version.
+Additionally, whenever a registry request is made, a `.cache.json` file
+is placed at the corresponding URI, to store the ETag and the requested
+data.
+
+Commands that make non-essential registry requests (such as `search` and
+`view`, or the completion scripts) generally specify a minimum timeout.
+If the `.cache.json` file is younger than the specified timeout, then
+they do not make an HTTP request to the registry.
+
## CONFIGURATION
-### root
+### cache
-Default: `$INSTALL_PREFIX/lib/node`
+Default: `$HOME/.npm` on Posix, or `$HOME/npm-cache` on Windows.
-The root folder where packages are installed and npm keeps its data.
+The root cache folder.
Oops, something went wrong.

0 comments on commit c178365

Please sign in to comment.