Welcome to mirror list, hosted at ThFree Co, Russian Federation.

config.1 « man - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 594c6a124e1d80ceaa4d32e1990b7efbac39e00b (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
.\" generated with Ronn/v0.4.1
.\" http://github.com/rtomayko/ronn/
.
.TH "NPM\-CONFIG" "1" "May 2010" "" ""
.
.SH "NAME"
\fBnpm\-config\fR \-\- Manage the npm configuration file
.
.SH "SYNOPSIS"
.
.nf
npm config set <key> <value>
npm config get <key>
npm config delete <key>
npm config list
.
.fi
.
.SH "DESCRIPTION"
The config command is a way to interact with the \fB.npmrc\fR file. This file is a
JSON encoded list of values that npm is concerned with. The first time you run
npm, it will create a conf file filled with default values.
.
.P
On exit, the current state of the config is always saved, so that any changes
will be recorded. You may safely modify the file (as long as it's still
parseable JSON), but it is safer to use the npm config commands.
.
.SH "Sub\-commands"
Config supports the following sub\-commands:
.
.SS "set"
.
.nf
npm config set key value
.
.fi
.
.P
Sets the config key to the value.
.
.SS "get"
.
.nf
npm config get key
.
.fi
.
.P
Echo the config value to stdout. (NOTE: All the other npm logging is done to
stderr, so pipes should work properly, and you can do \fBnpm get key 2>/dev/null\fR
to print out JUST the config value.)
.
.SS "list"
.
.nf
npm config list
.
.fi
.
.P
Show all the config settings.
.
.P
\fBFIXME\fR: Prints to stderr, but should really be stdout, since the log is what
you're after.
.
.SS "delete"
.
.nf
npm config delete key
.
.fi
.
.P
Deletes the key from the configuration file.
.
.SH "Config Settings"
npm supports a very basic argument parser.  For any of the settings
in npm\-config(1), you can set them explicitly for a single command by
doing:
.
.IP "" 4
.
.nf
npm \-\-key val <command>
.
.fi
.
.IP "" 0
.
.P
Configurations defined on the command line are not saved to the .npmrc file.
.
.SS "auto\-activate"
Default: true
.
.P
Automatically activate a package after installation, if there is not an active
version already.  Set to "always" to always activate when installing.
.
.SS "root"
Default: ~/.node_libraries in single\-user mode, or \fB$INSTALL_PREFIX/lib/node\fR
in sudo\-mode.
.
.P
The root folder where packages are installed and npm keeps its data.
.
.SS "binroot"
Default: \fB$INSTALL_PREFIX/bin\fR
.
.P
The folder where executable programs are installed.
.
.SS "registry"
Default: https://registry.npmjs.org/
.
.P
The base URL of the npm package registry.
.
.SS "auth"
A base\-64 encoded "user:pass" pair.  This is created by npm\-adduser(1).
.
.P
If your config file is ever corrupted, you can set this manually by doing:
.
.IP "" 4
.
.nf
npm config set auth $(echo "username:password" | base64 \-d)
.
.fi
.
.IP "" 0
.
.P
\fBNOTE\fR: This is not encoded in any kind of security sense. It's just base\-64
encoded strictly so that it can be sent along the wire with HTTP Basic
authentication.
.
.SS "authCrypt"
If crypto.Cipher is available, and you have some private keys in \fB$HOME/.ssh\fR,
then npm will encrypt your "auth" config before saving to the .npmrc file,
and will decrypt the "authCrypt" config when it reads the .npmrc file.
.
.SS "tag"
Default: stable
.
.P
If you ask npm to install a package and don't tell it a specific version, then
it will install the specified tag.
.
.P
Note: this has no effect on the npm\-tag(1) command.