2f4e463287cc9839581741ee30d7ae6d8198e9dc
[platform/upstream/nodejs.git] / deps / npm / html / doc / api / npm-deprecate.html
1 <!doctype html>
2 <html>
3   <title>npm-deprecate</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-deprecate.html">npm-deprecate</a></h1> <p>Deprecate a version of a package</p>
10
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
12
13 <pre><code>npm.commands.deprecate(args, callback)</code></pre>
14
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
16
17 <p>This command will update the npm registry entry for a package, providing
18 a deprecation warning to all who attempt to install it.</p>
19
20 <p>The &#39;args&#39; parameter must have exactly two elements:</p>
21
22 <ul><li><p><code>package[@version]</code></p><p>The <code>version</code> portion is optional, and may be either a range, or a
23 specific version, or a tag.</p></li><li><p><code>message</code></p><p>The warning message that will be printed whenever a user attempts to
24 install the package.</p></li></ul>
25
26 <p>Note that you must be the package owner to deprecate something.  See the
27 <code>owner</code> and <code>adduser</code> help topics.</p>
28
29 <p>To un-deprecate a package, specify an empty string (<code>&quot;&quot;</code>) for the <code>message</code> argument.</p>
30
31 <h2 id="SEE-ALSO">SEE ALSO</h2>
32
33 <ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
34 </div>
35 <p id="footer">npm-deprecate &mdash; npm@1.3.15</p>
36 <script>
37 ;(function () {
38 var wrapper = document.getElementById("wrapper")
39 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
40   .filter(function (el) {
41     return el.parentNode === wrapper
42         && el.tagName.match(/H[1-6]/)
43         && el.id
44   })
45 var l = 2
46   , toc = document.createElement("ul")
47 toc.innerHTML = els.map(function (el) {
48   var i = el.tagName.charAt(1)
49     , out = ""
50   while (i > l) {
51     out += "<ul>"
52     l ++
53   }
54   while (i < l) {
55     out += "</ul>"
56     l --
57   }
58   out += "<li><a href='#" + el.id + "'>" +
59     ( el.innerText || el.text || el.innerHTML)
60     + "</a>"
61   return out
62 }).join("\n")
63 toc.id = "toc"
64 document.body.appendChild(toc)
65 })()
66 </script>