4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../static/style.css">
9 <h1><a href="../api/publish.html">publish</a></h1> <p>Publish a package</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>npm.commands.publish([packages,] callback)</code></pre>
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
17 <p>Publishes a package to the registry so that it can be installed by name.
18 Possible values in the 'packages' array are:</p>
20 <ul><li><p><code><folder></code>:
21 A folder containing a package.json file</p></li><li><p><code><tarball></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>
25 <p>If the package array is empty, npm will try to publish something in the
26 current working directory.</p>
28 <p>This command could fails if one of the packages specified already exists in
29 the registry. Overwrites when the "force" environment variable is set.</p>
31 <h2 id="SEE-ALSO">SEE ALSO</h2>
33 <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
35 <p id="footer">publish — npm@1.1.48</p>
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]/)
46 , toc = document.createElement("ul")
47 toc.innerHTML = els.map(function (el) {
48 var i = el.tagName.charAt(1)
58 out += "<li><a href='#" + el.id + "'>" +
59 ( el.innerText || el.text || el.innerHTML)
64 document.body.appendChild(toc)