3 <title>npm-explore</title>
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/npm-explore.html">npm-explore</a></h1> <p>Browse an installed package</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>npm.commands.explore(args, callback)</code></pre>
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
17 <p>Spawn a subshell in the directory of the installed package specified.</p>
19 <p>If a command is specified, then it is run in the subshell, which then
20 immediately terminates.</p>
22 <p>Note that the package is <em>not</em> automatically rebuilt afterwards, so be
23 sure to use <code>npm rebuild <pkg></code> if you make any changes.</p>
25 <p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
27 <p id="footer">npm-explore — npm@1.3.19</p>
30 var wrapper = document.getElementById("wrapper")
31 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
32 .filter(function (el) {
33 return el.parentNode === wrapper
34 && el.tagName.match(/H[1-6]/)
38 , toc = document.createElement("ul")
39 toc.innerHTML = els.map(function (el) {
40 var i = el.tagName.charAt(1)
50 out += "<li><a href='#" + el.id + "'>" +
51 ( el.innerText || el.text || el.innerHTML)
56 document.body.appendChild(toc)