summaryrefslogtreecommitdiff
path: root/deps/npm/doc/api/load.md
blob: a95a6b295daa292133d1604419a1fffc6d9f5240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
npm-load(3) -- Load config settings
===================================

## SYNOPSIS

    npm.load(conf, cb)

## DESCRIPTION

npm.load() must be called before any other function call.  Both parameters are
optional, but the second is recommended.

The first parameter is an object hash of command-line config params, and the
second parameter is a callback that will be called when npm is loaded and
ready to serve.

The first parameter should follow a similar structure as the package.json
config object.

For example, to emulate the --dev flag, pass an object that looks like this:

    {
      "dev": true
    }

For a list of all the available command-line configs, see `npm help config`