The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / deps / npm / html / api / tag.html @ d46ebffb

History | View | Annotate | Download (1.88 KB)

1
<!doctype html>
2
<html>
3
  <title>tag</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/tag.html">tag</a></h1> <p>Tag a published version</p>
10

    
11
<h2 id="SYNOPSIS">SYNOPSIS</h2>
12

    
13
<pre><code>npm.commands.tag(package@version, tag, callback)</code></pre>
14

    
15
<h2 id="DESCRIPTION">DESCRIPTION</h2>
16

    
17
<p>Tags the specified version of the package with the specified tag, or the
18
<code>--tag</code> config if not specified.</p>
19

    
20
<p>The &#39;package@version&#39; is an array of strings, but only the first two elements are
21
currently used.</p>
22

    
23
<p>The first element must be in the form package@version, where package
24
is the package name and version is the version number (much like installing a
25
specific version).</p>
26

    
27
<p>The second element is the name of the tag to tag this version with. If this
28
parameter is missing or falsey (empty), the default froom the config will be
29
used. For more information about how to set this config, check
30
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
31
</div>
32
<p id="footer">tag &mdash; npm@1.2.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>
64
</body></html>