bf948bf6db996bffbb8d7d30528f91ec2a7a5721
[platform/upstream/nodejs.git] / deps / npm / html / doc / api / npm-shrinkwrap.html
1 <!doctype html>
2 <html>
3   <title>npm-shrinkwrap</title>
4   <meta http-equiv="content-type" value="text/html;utf-8">
5   <link rel="stylesheet" type="text/css" href="../../static/style.css">
6
7   <body>
8     <div id="wrapper">
9 <h1><a href="../api/npm-shrinkwrap.html">npm-shrinkwrap</a></h1> <p>programmatically generate package shrinkwrap file</p>
10
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
12
13 <pre><code>npm.commands.shrinkwrap(args, [silent,] callback)</code></pre>
14
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
16
17 <p>This acts much the same ways as shrinkwrapping on the command-line.</p>
18
19 <p>This command does not take any arguments, but &#39;args&#39; must be defined.
20 Beyond that, if any arguments are passed in, npm will politely warn that it
21 does not take positional arguments.</p>
22
23 <p>If the &#39;silent&#39; parameter is set to true, nothing will be output to the screen,
24 but the shrinkwrap file will still be written.</p>
25
26 <p>Finally, &#39;callback&#39; is a function that will be called when the shrinkwrap has
27 been saved.</p>
28 </div>
29 <p id="footer">npm-shrinkwrap &mdash; npm@1.3.17</p>
30 <script>
31 ;(function () {
32 var wrapper = document.getElementById("wrapper")
33 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
34   .filter(function (el) {
35     return el.parentNode === wrapper
36         && el.tagName.match(/H[1-6]/)
37         && el.id
38   })
39 var l = 2
40   , toc = document.createElement("ul")
41 toc.innerHTML = els.map(function (el) {
42   var i = el.tagName.charAt(1)
43     , out = ""
44   while (i > l) {
45     out += "<ul>"
46     l ++
47   }
48   while (i < l) {
49     out += "</ul>"
50     l --
51   }
52   out += "<li><a href='#" + el.id + "'>" +
53     ( el.innerText || el.text || el.innerHTML)
54     + "</a>"
55   return out
56 }).join("\n")
57 toc.id = "toc"
58 document.body.appendChild(toc)
59 })()
60 </script>