diff --git a/deps/npm/README.md b/deps/npm/README.md index 1257f14716..0c138134e4 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -35,31 +35,18 @@ paths, etc.) then read on. ## Fancy Install (Unix) -To install npm with one command, do this: - - curl http://npmjs.org/install.sh | sh - -To skip the npm 0.x cleanup, do this: - - curl http://npmjs.org/install.sh | clean=no sh - -To say "yes" to the 0.x cleanup, but skip the prompt: - - curl http://npmjs.org/install.sh | clean=yes sh - -If you get permission errors, you'll need to **run** the script as root. -(Note, just putting `sudo` in front of the `curl` will **fetch** the script -as root.) +There's a pretty robust install script at +. You can download that and run it. ### Slightly Fancier You can set any npm configuration params with that script: - curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh +npm_config_prefix=/some/path sh install.sh Or, you can run it in uber-debuggery mode: - curl http://npmjs.org/install.sh | npm_debug=1 sh +npm_debug=1 sh install.sh ### Even Fancier @@ -83,21 +70,6 @@ git, and mess with it directly. No. -## Dev Install - -To install the latest **unstable** development version from git: - - git clone https://github.com/isaacs/npm.git - cd npm - sudo make install # (or: `node cli.js install -gf`) - -If you're sitting in the code folder reading this document in your -terminal, then you've already got the code. Just do: - - sudo make install - -and npm will install itself. - ## Permissions when Using npm to Install Other Stuff **tl;dr** @@ -163,6 +135,14 @@ 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") npm.load(myConfigObject, function (er) { if (er) return handlError(er) @@ -195,8 +175,7 @@ especially the [faq](http://npmjs.org/doc/faq.html). You can use the `npm help` command to read any of them. If you're a developer, and you want to use npm to publish your program, -you should -[read this](http://npmjs.org/doc/developers.html) +you should [read this](http://npmjs.org/doc/developers.html) ## Legal Stuff diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js index a71985b37b..ef8873542b 100755 --- a/deps/npm/bin/npm-cli.js +++ b/deps/npm/bin/npm-cli.js @@ -22,10 +22,10 @@ log.info("it worked if it ends with", "ok") var fs = require("graceful-fs") , path = require("path") , npm = require("../lib/npm.js") - , ini = require("../lib/utils/ini.js") + , npmconf = require("npmconf") , errorHandler = require("../lib/utils/error-handler.js") - , configDefs = require("../lib/utils/config-defs.js") + , configDefs = npmconf.defs , shorthands = configDefs.shorthands , types = configDefs.types , nopt = require("nopt") @@ -50,10 +50,9 @@ if (conf.version) { } if (conf.versions) { - var v = process.versions - v.npm = npm.version - console.log(v) - return + npm.command = "version" + conf.usage = false + npm.argv = [] } log.info("using", "npm@%s", npm.version) diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 8d7fbc97d6..d3650c2777 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@

This function should not be used programmatically. Instead, just refer to the npm.bin member.

- +