diff options
author | isaacs <i@izs.me> | 2011-07-30 20:47:24 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-07-30 20:47:24 +0400 |
commit | 701a8210a527948791794c191aac5671a18d09d5 (patch) | |
tree | 33857062690b4e4759da23860ad76d7f098e2ba4 /README.md | |
parent | 8923b80796770da810f41b93634c4bbb6a8f2482 (diff) |
Confusion about args vs conf
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -153,6 +153,16 @@ npm.load(myConfigObject, function (er) { }) ``` +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 +optional arguments. Read the source. + +You cannot set configs individually for any single npm function at this +time. Since `npm` is a singleton, any call to `npm.config.set` will +change the value for *all* npm commands in that process. + See `./bin/npm.js` for an example of pulling config values off of the command line arguments using nopt. You may also want to check out `npm help config` to learn about all the options you can set there. |