mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
.TH "NPM\-CONFIG" "3" "March 2015" "" ""
|
|
.SH "NAME"
|
|
\fBnpm-config\fR \- Manage the npm configuration files
|
|
.SH SYNOPSIS
|
|
.P
|
|
.RS 2
|
|
.nf
|
|
npm\.commands\.config(args, callback)
|
|
var val = npm\.config\.get(key)
|
|
npm\.config\.set(key, val)
|
|
.fi
|
|
.RE
|
|
.SH DESCRIPTION
|
|
.P
|
|
This function acts much the same way as the command\-line version\. The first
|
|
element in the array tells config what to do\. Possible values are:
|
|
.RS 0
|
|
.IP \(bu 2
|
|
\fBset\fR
|
|
Sets a config parameter\. The second element in \fBargs\fR is interpreted as the
|
|
key, and the third element is interpreted as the value\.
|
|
.IP \(bu 2
|
|
\fBget\fR
|
|
Gets the value of a config parameter\. The second element in \fBargs\fR is the
|
|
key to get the value of\.
|
|
.IP \(bu 2
|
|
\fBdelete\fR (\fBrm\fR or \fBdel\fR)
|
|
Deletes a parameter from the config\. The second element in \fBargs\fR is the
|
|
key to delete\.
|
|
.IP \(bu 2
|
|
\fBlist\fR (\fBls\fR)
|
|
Show all configs that aren't secret\. No parameters necessary\.
|
|
.IP \(bu 2
|
|
\fBedit\fR:
|
|
Opens the config file in the default editor\. This command isn't very useful
|
|
programmatically, but it is made available\.
|
|
|
|
.RE
|
|
.P
|
|
To programmatically access npm configuration settings, or set them for
|
|
the duration of a program, use the \fBnpm\.config\.set\fR and \fBnpm\.config\.get\fR
|
|
functions instead\.
|
|
.SH SEE ALSO
|
|
.RS 0
|
|
.IP \(bu 2
|
|
npm apihelp npm
|
|
|
|
.RE
|
|
|
|
|