1862a7e1e109c235bfc592cad21107f6f84a8b63
[platform/upstream/nodejs.git] / deps / npm / man / man3 / npm-load.3
1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
3 .
4 .TH "NPM\-LOAD" "3" "November 2013" "" ""
5 .
6 .SH "NAME"
7 \fBnpm-load\fR \-\- Load config settings
8 .
9 .SH "SYNOPSIS"
10 .
11 .nf
12 npm\.load(conf, cb)
13 .
14 .fi
15 .
16 .SH "DESCRIPTION"
17 npm\.load() must be called before any other function call\.  Both parameters are
18 optional, but the second is recommended\.
19 .
20 .P
21 The first parameter is an object hash of command\-line config params, and the
22 second parameter is a callback that will be called when npm is loaded and
23 ready to serve\.
24 .
25 .P
26 The first parameter should follow a similar structure as the package\.json
27 config object\.
28 .
29 .P
30 For example, to emulate the \-\-dev flag, pass an object that looks like this:
31 .
32 .IP "" 4
33 .
34 .nf
35 {
36   "dev": true
37 }
38 .
39 .fi
40 .
41 .IP "" 0
42 .
43 .P
44 For a list of all the available command\-line configs, see \fBnpm help config\fR