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 / doc / submodule.html @ d46ebffb

History | View | Annotate | Download (2.05 KB)

1
<!doctype html>
2
<html>
3
  <title>submodule</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="../doc/submodule.html">submodule</a></h1> <p>Add a package as a git submodule</p>
10

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

    
13
<pre><code>npm submodule &lt;pkg&gt;</code></pre>
14

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

    
17
<p>If the specified package has a git repository url in its package.json
18
description, then this command will add it as a git submodule at
19
<code>node_modules/&lt;pkg name&gt;</code>.</p>
20

    
21
<p>This is a convenience only.  From then on, it&#39;s up to you to manage
22
updates by using the appropriate git commands.  npm will stubbornly
23
refuse to update, modify, or remove anything with a <code>.git</code> subfolder
24
in it.</p>
25

    
26
<p>This command also does not install missing dependencies, if the package
27
does not include them in its git repository.  If <code>npm ls</code> reports that
28
things are missing, you can either install, link, or submodule them yourself,
29
or you can do <code>npm explore &lt;pkgname&gt; -- npm install</code> to install the
30
dependencies into the submodule folder.</p>
31

    
32
<h2 id="SEE-ALSO">SEE ALSO</h2>
33

    
34
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
35
</div>
36
<p id="footer">submodule &mdash; npm@1.2.17</p>
37
<script>
38
;(function () {
39
var wrapper = document.getElementById("wrapper")
40
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
41
  .filter(function (el) {
42
    return el.parentNode === wrapper
43
        && el.tagName.match(/H[1-6]/)
44
        && el.id
45
  })
46
var l = 2
47
  , toc = document.createElement("ul")
48
toc.innerHTML = els.map(function (el) {
49
  var i = el.tagName.charAt(1)
50
    , out = ""
51
  while (i > l) {
52
    out += "<ul>"
53
    l ++
54
  }
55
  while (i < l) {
56
    out += "</ul>"
57
    l --
58
  }
59
  out += "<li><a href='#" + el.id + "'>" +
60
    ( el.innerText || el.text || el.innerHTML)
61
    + "</a>"
62
  return out
63
}).join("\n")
64
toc.id = "toc"
65
document.body.appendChild(toc)
66
})()
67
</script>
68
</body></html>