e361860b5ec7b77838e5d03f2001c05d85b11b8d
[platform/upstream/nodejs.git] / deps / npm / html / doc / cli / npm-help-search.html
1 <!doctype html>
2 <html>
3   <title>npm-help-search</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-help-search.html">npm-help-search</a></h1> <p>Search npm help documentation</p>
10
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
12
13 <pre><code>npm help-search some search terms</code></pre>
14
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
16
17 <p>This command will search the npm markdown documentation files for the
18 terms provided, and then list the results, sorted by relevance.</p>
19
20 <p>If only one result is found, then it will show that help topic.</p>
21
22 <p>If the argument to <code>npm help</code> is not a known help topic, then it will
23 call <code>help-search</code>.  It is rarely if ever necessary to call this
24 command directly.</p>
25
26 <h2 id="CONFIGURATION">CONFIGURATION</h2>
27
28 <h3 id="long">long</h3>
29
30 <ul><li>Type: Boolean</li><li>Default false</li></ul>
31
32 <p>If true, the &quot;long&quot; flag will cause help-search to output context around
33 where the terms were found in the documentation.</p>
34
35 <p>If false, then help-search will just list out the help topics found.</p>
36
37 <h2 id="SEE-ALSO">SEE ALSO</h2>
38
39 <ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li></ul>
40 </div>
41 <p id="footer">npm-help-search &mdash; npm@1.3.17</p>
42 <script>
43 ;(function () {
44 var wrapper = document.getElementById("wrapper")
45 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
46   .filter(function (el) {
47     return el.parentNode === wrapper
48         && el.tagName.match(/H[1-6]/)
49         && el.id
50   })
51 var l = 2
52   , toc = document.createElement("ul")
53 toc.innerHTML = els.map(function (el) {
54   var i = el.tagName.charAt(1)
55     , out = ""
56   while (i > l) {
57     out += "<ul>"
58     l ++
59   }
60   while (i < l) {
61     out += "</ul>"
62     l --
63   }
64   out += "<li><a href='#" + el.id + "'>" +
65     ( el.innerText || el.text || el.innerHTML)
66     + "</a>"
67   return out
68 }).join("\n")
69 toc.id = "toc"
70 document.body.appendChild(toc)
71 })()
72 </script>