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

index.html « doc « html - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d094bfbf26d3d190399197c2a1b60252ddc4573d (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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
<!doctype html>
<html>
  <title>npm-npm</title>
<style type="text/css">

/* reset */
* {
    margin:0;
    padding:0;
    border:none;
    font-family:inherit;
    font-size:inherit;
    font-weight:inherit;
}
:target::before {
    content:" → ";
    position:absolute;
    display:block;
    opacity:0.5;
    color:#f00;
    margin:0 0 0 -1.2em;
}
abbr, acronym {
  border-bottom:1px dotted #aaa;
}
kbd, code, pre {
  font-family:monospace;
    margin:0;
    font-size:18px;
    line-height:24px;
  background:#eee;
  outline:1px solid #ccc;
}
kbd code, kbd pre, kbd kbd,
pre code, pre pre, pre kbd,
code code, code pre, code kbd { outline: none }
.dollar::before {
  content:"$ ";
  display:inline;
}
p, ul, ol, dl, pre {
    margin:30px 0;
    line-height:30px;
}
hr {
    margin:30px auto 29px;
    width:66%;
    height:1px;
    background:#aaa;
}
pre {
    display:block;
}
dd :first-child {
    margin-top:0;
}

body {
    quotes:"“" "”" "‘" "’";
    width:666px;
    margin:30px auto 120px;
    font-family:Times New Roman, serif;
    font-size:20px;
    background:#fff;
    line-height:30px;
    color:#111;
}

blockquote {
    position:relative;
    font-size:16px;
    line-height:30px;
    font-weight:bold;
    width:85%;
    margin:0 auto;
}
blockquote::before {
    font-size:90px;
    display:block;
    position:absolute;
    top:20px;
    right:100%;
    content:"“";
    padding-right:10px;
    color:#ccc;
}
.source cite::before {
    content:"— ";
}
.source {
    padding-left:20%;
    margin-top:30px;
}
.source cite span {
    font-style:normal;
}
blockquote p {
    margin-bottom:0;
}
.quote blockquote {
    font-weight:normal;
}

h1, h2, h3, h4, h5, h6, dt, #header {
  font-family:serif;
  font-size:20px;
  font-weight:bold;
}
h2 {
  background:#eee;
}
h1, h2 {
  line-height:40px;
}

i, em, cite {
    font-style:italic;
}
b, strong { 
    font-weight:bold;
}
i, em, cite, b, strong, small {
    line-height:28px;
}
small, .small, .small *, aside {
    font-style:italic;
    color:#669;
    font-size:18px;
}
spall a, .small a {
    text-decoration:underline;
}
del {
    text-decoration:line-through;
}
ins {
    text-decoration:underline;
}
.alignright { display:block; float:right; margin-left:1em; }
.alignleft { display:block; float:left; margin-right:1em; }

q:before, q q q:before, q q q q q:before, q q q q q q q:before { content:"“"; }
q q:before, q q q q:before, q q q q q q:before, q q q q q q q q:before { content:"‘"; }
q:after, q q q:after, q q q q q:after, q q q q q q q:after { content:"”"; }
q q:after, q q q q:after, q q q q q q:after, q q q q q q q q:after { content:"’"; }

a { color:#00f; text-decoration:none; }
a:visited { color:#636; }
a:hover, a:active { color:#900!important; text-decoration:underline; }

h1 {
  font-weight:bold;
  background:#fff;
}

.navigation {
    display:table;
    width:100%;
    margin:0 0 30px 0;
    position:relative;
}
#nav-above {
    margin-bottom:0;
}
.navigation .nav-previous {
    display:table-cell;
    text-align:left;
    width:50%;
}
/* hang the » and « off into the margins */
.navigation .nav-previous a:before, .navigation .nav-next a:after {
    content: "«";
    display:block;
    height:30px;
    margin-bottom:-30px;
    text-decoration:none;
    margin-left:-15px;
}
.navigation .nav-next a:after {
    content: "»";
    text-align:right;
    margin-left:0;
    margin-top:-30px;
    margin-right:-15px;
}


.navigation .nav-next {
    display:table-cell;
    text-align:right;
    width:50%;
}
.navigation a {
    display:block;
    width:100%;
    height:100%;
}

input, button, textarea {
    border:0;
    line-height:30px;
}
textarea {
    height:300px;
}
input {
    height:30px;
    line-height:30px;
}
input.submit, input#submit, input.button, button, input[type=submit] {
    cursor:hand; cursor:pointer;
    outline:1px solid #ccc;
}

#wrapper {
    margin-bottom:90px;
    position:relative;
    z-index:1;
    *zoom:1;
    background:#fff;
}
#wrapper:after {
    display:block;
    content:".";
    visibility:hidden;
    width:0;
    height:0;
    clear:both;
}

.sidebar .xoxo > li {
    float:left;
    width:50%;
}
.sidebar li {
    list-style:none;
}
.sidebar #elsewhere {
    margin-left:-10%;
    margin-right:-10%;
}
.sidebar #rss-links, .sidebar #twitter-feeds {
    float:right;
    clear:right;
    width:20%;
}
.sidebar #comment {
  clear:both;
  float:none;
  width:100%;
}
.sidebar #search {
    clear:both;
    float:none;
    width:100%;
}
.sidebar #search h2 {
    margin-left:40%;
}
.sidebar #search #s {
    width:90%;
    float:left;
}
.sidebar #search #searchsubmit {
    width:10%;
    float:right;
}
.sidebar * {
    font-size:15px;
    line-height:30px;
}

#footer, #footer * {
    margin:300px 0 0;
    text-align:right;
    font-size:14px;
    line-height:90px;
}

#toc {
  position:absolute;
  top:0;
  right:0;
  padding:40px 0 40px 20px;
  margin:0;
  width:200px;
  opacity:0.2;
  z-index:-1;
}
#toc:hover {
  opacity:1;
  background:#fff;
  z-index:999;
}
#toc ul {
  padding:0;
  margin:0;
}
#toc, #toc li {
  list-style-type:none;
  font-size:15px;
  line-height:15px;
}
#toc li {
  padding:0 0 0 10px;
}


@media print {
    a[href] {
        color:inherit;
    }
    a[href]:after {
        white-space:nowrap;
        content:" " attr(href);
    }
    a[href^=\#], .navigation {
        display:none;
    }
}
</style>

  <body>
    <div id="wrapper">
<h1><a href="index.html">npm(1)</a> -- node package manager</h1>

<h2 id="SYNOPSIS">SYNOPSIS</h2>

<pre><code>npm &lt;command&gt; [args]</code></pre>

<h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>npm is the package manager for the Node JavaScript platform.  It puts
modules in place so that node can find them, and manages dependency
conflicts intelligently.</p>

<p>It is extremely configurable to support a wide variety of use cases.
Most commonly, it is used to publish, discover, install, and develop node
programs.</p>

<p>Run <code>npm help</code> to get a list of available commands.</p>

<h2 id="INTRODUCTION">INTRODUCTION</h2>

<p>You probably got npm because you want to install stuff.</p>

<p>Use <code>npm install blerg</code> to install the latest version of "blerg".  Check out
<code>npm help install</code> for more info.  It can do a lot of stuff.</p>

<p>Use the <code>npm search</code> command to show everything that's available.
Use <code>npm ls</code> to show everything you've installed.</p>

<h2 id="DIRECTORIES">DIRECTORIES</h2>

<p>See <code>npm help folders</code> to learn about where npm puts stuff.</p>

<p>In particular, npm has two modes of operation:</p>

<ul><li>global mode:<br />npm installs packages into the install prefix at
<code>prefix/lib/node_modules</code> and bins are installed in <code>prefix/bin</code>.</li><li>local mode:<br />npm installs packages into the current project directory, which
defaults to the current working directory.  Packages are installed to
<code>./node_modules</code>, and bins are installed to <code>./node_modules/.bin</code>.</li></ul>

<p>Local mode is the default.  Use <code>--global</code> or <code>-g</code> on any command to
operate in global mode instead.</p>

<h2 id="DEVELOPER-USAGE">DEVELOPER USAGE</h2>

<p>If you're using npm to develop and publish your code, check out the
following help topics:</p>

<ul><li>json:
Make a package.json file.  See <code>npm help json</code>.</li><li>link:
For linking your current working code into Node's path, so that you
don't have to reinstall every time you make a change.  Use
<code>npm link</code> to do this.</li><li>install:
It's a good idea to install things if you don't need the symbolic link.
Especially, installing other peoples code from the registry is done via
<code>npm install</code></li><li>adduser:
Create an account or log in.  Creditials are stored in the
user config file.</li><li>publish:
Use the <code>npm publish</code> command to upload your code to the registry.</li></ul>

<h2 id="CONFIGURATION">CONFIGURATION</h2>

<p>npm is extremely configurable.  It reads its configuration options from
5 places.</p>

<ul><li>Command line switches:<br />Set a config with <code>--key val</code>.  All keys take a value, even if they
are booleans (the config parser doesn't know what the options are at
the time of parsing.)  If no value is provided, then the option is set
to boolean <code>true</code>.</li><li>Environment Variables:<br />Set any config by prefixing the name in an environment variable with
<code>npm_config_</code>.  For example, <code>export npm_config_key=val</code>.</li><li>User Configs:<br />The file at $HOME/.npmrc is an ini-formatted list of configs.  If
present, it is parsed.  If the <code>userconfig</code> option is set in the cli
or env, then that will be used instead.</li><li>Global Configs:<br />The file found at ../etc/npmrc (from the node executable, by default
this resolves to /usr/local/etc/npmrc) will be parsed if it is found.
If the <code>globalconfig</code> option is set in the cli, env, or user config,
then that file is parsed instead.</li><li>Defaults:<br />npm's default configuration options are defined in
lib/utils/config-defs.js.  These must not be changed.</li></ul>

<p>See <code>npm help config</code> for much much more information.</p>

<h2 id="CONTRIBUTIONS">CONTRIBUTIONS</h2>

<p>Patches welcome!</p>

<ul><li>code:
Read through <code>npm help coding-style</code> if you plan to submit code.
You don't have to agree with it, but you do have to follow it.</li><li>docs:
If you find an error in the documentation, edit the appropriate markdown
file in the "doc" folder.  (Don't worry about generating the man page.)</li></ul>

<p>Contributors are listed in npm's <code>package.json</code> file.  You can view them
easily by doing <code>npm view npm contributors</code>.</p>

<p>If you would like to contribute, but don't know what to work on, check
the issues list or ask on the mailing list.</p>

<ul><li><a href="http://github.com/isaacs/npm/issues">http://github.com/isaacs/npm/issues</a></li><li><a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li></ul>

<h2 id="BUGS">BUGS</h2>

<p>When you find issues, please report them:</p>

<ul><li>web:
<a href="http://github.com/isaacs/npm/issues">http://github.com/isaacs/npm/issues</a></li><li>email:
<a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li></ul>

<p>Be sure to include <em>all</em> of the output from the npm command that didn't work
as expected.  The <code>npm-debug.log</code> file is also helpful to provide.</p>

<p>You can also look for isaacs in #node.js on irc://irc.freenode.net.  He
will no doubt tell you to put the output in a gist or email.</p>

<h2 id="HISTORY">HISTORY</h2>

<p>See <a href="changelog.html">npm-changelog(1)</a></p>

<h2 id="AUTHOR">AUTHOR</h2>

<p>Isaac Z. Schlueter :: isaacs :: @izs :: <a href="mailto:i@izs.me">i@izs.me</a></p>
</div>
<script>
els = Array.prototype.slice.call((wrapper = document.getElementById("wrapper"))
.getElementsByTagName("*"), 0)
.filter(function (el) {
  return el.parentNode === wrapper
      && el.tagName.match(/H[1-6]/)
      && el.id
})
var l = 2
;(toc = document.createElement("ul")).innerHTML = els.map(function (el) {
  var i = el.tagName.charAt(1)
    , out = ""
  while (i > l) {
    out += "<ul>"
    l ++
  }
  while (i < l) {
    out += "</ul>"
    l --
  }
  out += "<li><a href='#" + el.id + "'>" + el.innerHTML + "</a>"
  return out
}).join("\n")
toc.id = "toc"
document.body.appendChild(toc)

</script>
</body></html>
<!-- npm help npm - 2011-31-04 05:09:23 -->