Sha256: 5f00a8a6c0ef588f9229d3b55ec535a73890a0c5c2039afcb7a5698ed047f4c6

Contents?: true

Size: 1.03 KB

Versions: 28

Compression:

Stored size: 1.03 KB

Contents

# npmconf

The config thing npm uses

If you are interested in interacting with the config settings that npm
uses, then use this module.

However, if you are writing a new Node.js program, and want
configuration functionality similar to what npm has, but for your
own thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),
which is probably what you want.

If I were to do it all over again, that's what I'd do for npm.  But,
alas, there are many systems depending on many of the particulars of
npm's configuration setup, so it's not worth the cost of changing.

## USAGE

```javascript
var npmconf = require('npmconf')

// pass in the cli options that you read from the cli
// or whatever top-level configs you want npm to use for now.
npmconf.load({some:'configs'}, function (er, conf) {
  // do stuff with conf
  conf.get('some', 'cli') // 'configs'
  conf.get('username') // 'joebobwhatevers'
  conf.set('foo', 'bar', 'user')
  conf.save('user', function (er) {
    // foo = bar is now saved to ~/.npmrc or wherever
  })
})
```

Version data entries

28 entries across 21 versions & 4 rubygems

Version Path
entangled-0.0.13 spec/dummy/public/node_modules/phantomjs/node_modules/npmconf/README.md
entangled-0.0.12 spec/dummy/public/node_modules/phantomjs/node_modules/npmconf/README.md
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/npmconf/README.md
entangled-0.0.11 spec/dummy/public/node_modules/phantomjs/node_modules/npmconf/README.md
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/npmconf/README.md
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/npmconf/README.md
entangled-0.0.10 spec/dummy/public/node_modules/phantomjs/node_modules/npmconf/README.md
embeditor-rails-2.0.0.beta lib/node_modules/npm/node_modules/npmconf/README.md