node/deps/npm/man/man3/npm-load.3

35 lines
760 B
Groff
Raw Normal View History

.TH "NPM\-LOAD" "3" "March 2015" "" ""
.SH "NAME"
2014-09-25 05:41:07 +08:00
\fBnpm-load\fR \- Load config settings
.SH SYNOPSIS
.P
.RS 2
2014-11-05 07:08:12 +08:00
.nf
npm\.load(conf, cb)
2014-11-05 07:08:12 +08:00
.fi
2014-09-25 05:41:07 +08:00
.RE
.SH DESCRIPTION
.P
npm\.load() must be called before any other function call\. Both parameters are
optional, but the second is recommended\.
.P
2014-11-05 07:08:12 +08:00
The first parameter is an object containing command\-line config params, and the
second parameter is a callback that will be called when npm is loaded and ready
to serve\.
.P
The first parameter should follow a similar structure as the package\.json
config object\.
.P
For example, to emulate the \-\-dev flag, pass an object that looks like this:
2014-09-25 05:41:07 +08:00
.P
.RS 2
2014-11-05 07:08:12 +08:00
.nf
{
"dev": true
}
2014-11-05 07:08:12 +08:00
.fi
2014-09-25 05:41:07 +08:00
.RE
.P
For a list of all the available command\-line configs, see \fBnpm help config\fR
2014-09-25 05:41:07 +08:00