605b0bf6599810aa873193f259286e0572bdfe64
[platform/upstream/nodejs.git] / deps / npm / html / doc / cli / npm-publish.html
1 <!doctype html>
2 <html>
3   <title>npm-publish</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="../cli/npm-publish.html">npm-publish</a></h1> <p>Publish a package</p>
10
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
12
13 <pre><code>npm publish &lt;tarball&gt;
14 npm publish &lt;folder&gt;</code></pre>
15
16 <h2 id="DESCRIPTION">DESCRIPTION</h2>
17
18 <p>Publishes a package to the registry so that it can be installed by name.</p>
19
20 <ul><li><p><code>&lt;folder&gt;</code>:
21 A folder containing a package.json file</p></li><li><p><code>&lt;tarball&gt;</code>:
22 A url or file path to a gzipped tar archive containing a single folder
23 with a package.json file inside.</p></li></ul>
24
25 <p>Fails if the package name and version combination already exists in
26 the registry.  Overwrites when the &quot;--force&quot; flag is set.</p>
27
28 <h2 id="SEE-ALSO">SEE ALSO</h2>
29
30 <ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li></ul>
31 </div>
32 <p id="footer">npm-publish &mdash; npm@1.3.17</p>
33 <script>
34 ;(function () {
35 var wrapper = document.getElementById("wrapper")
36 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
37   .filter(function (el) {
38     return el.parentNode === wrapper
39         && el.tagName.match(/H[1-6]/)
40         && el.id
41   })
42 var l = 2
43   , toc = document.createElement("ul")
44 toc.innerHTML = els.map(function (el) {
45   var i = el.tagName.charAt(1)
46     , out = ""
47   while (i > l) {
48     out += "<ul>"
49     l ++
50   }
51   while (i < l) {
52     out += "</ul>"
53     l --
54   }
55   out += "<li><a href='#" + el.id + "'>" +
56     ( el.innerText || el.text || el.innerHTML)
57     + "</a>"
58   return out
59 }).join("\n")
60 toc.id = "toc"
61 document.body.appendChild(toc)
62 })()
63 </script>