Revision 5aef65a9 deps/npm/html/api/npm.html

View differences:

deps/npm/html/api/npm.html
11 11
<h2 id="SYNOPSIS">SYNOPSIS</h2>
12 12

  
13 13
<pre><code>var npm = require(&quot;npm&quot;)
14
npm.load(configObject, function (er, npm) {
14
npm.load([configObject,] function (er, npm) {
15 15
  // use the npm object, now that it&#39;s loaded.
16 16

  
17 17
  npm.config.set(key, val)
......
24 24

  
25 25
<h2 id="VERSION">VERSION</h2>
26 26

  
27
<p>1.2.2</p>
27
<p>1.2.10</p>
28 28

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

  
......
32 32
To find documentation of the command line
33 33
client, see <code><a href="../doc/npm.html">npm(1)</a></code>.</p>
34 34

  
35
<p>Prior to using npm&#39;s commands,
36
<code>npm.load()</code> must be called with an object hash of
37
top-level configs.  In the npm command line client,
38
this set of configs is parsed from the command line options.  Additional
39
configuration params are loaded from two configuration files.  See
40
<code><a href="../doc/config.html">config(1)</a></code> for more information.</p>
35
<p>Prior to using npm&#39;s commands, <code>npm.load()</code> must be called.
36
If you provide <code>configObject</code> as an object hash of top-level
37
configs, they override the values stored in the various config
38
locations. In the npm command line client, this set of configs
39
is parsed from the command line options. Additional configuration
40
params are loaded from two configuration files. See <code><a href="../doc/config.html">config(1)</a></code>
41
for more information.</p>
41 42

  
42 43
<p>After that, each of the functions are accessible in the
43 44
commands object: <code>npm.commands.&lt;cmd&gt;</code>.  See <code><a href="../doc/index.html">index(1)</a></code> for a list of
......
91 92

  
92 93
<pre><code>var cmd = npm.deref(&quot;unp&quot;) // cmd === &quot;unpublish&quot;</code></pre>
93 94
</div>
94
<p id="footer">npm &mdash; npm@1.2.2</p>
95
<p id="footer">npm &mdash; npm@1.2.10</p>
95 96
<script>
96 97
;(function () {
97 98
var wrapper = document.getElementById("wrapper")

Also available in: Unified diff