-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathabout-commandline.html
175 lines (172 loc) · 8.01 KB
/
about-commandline.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<!-- THIS IS A GENERATED FILE. DO NOT EDIT. -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="About command-line arguments to JSDoc.">
<title>Use JSDoc: Command-line arguments to JSDoc</title>
<link rel="stylesheet" href="styles/usejsdoc.css">
<link rel="stylesheet" href="styles/prettify.css">
<link rel="stylesheet" href="styles/css3-github-ribbon.css">
<script src="scripts/prettify.js"></script>
</head>
<body>
<header>
<a href="./index.html">@use JSDoc</a>
</header>
<article>
<h1>Command-line arguments to JSDoc</h1>
<h2>Table of Contents</h2>
<ul>
<li>
<a href="#examples">Examples</a>
</li>
<li>
<a href="#related-links">Related Links</a>
</li>
</ul>
<p>At its most basic level, JSDoc is used like so:</p>
<pre class="prettyprint"><code>/path/to/jsdoc yourSourceCodeFile.js anotherSourceCodeFile.js ...
</code></pre>
<p>where <code>...</code> are paths to other files to generate documentation for.</p>
<p>Additionally, one may provide the path to a <a href="http://daringfireball.net/projects/markdown/">Markdown file</a> (ending in ".md") or a
file
named "README", and this will be added to the documentation on the front page. See <a href="about-including-readme.html">these
instructions</a>.</p>
<p>JSDoc supports a number of command-line options, many of which have both long and short forms.
Alternatively, the command-line options may be <a href="about-configuring-jsdoc.html">specified in a configuration file</a>
given to JSDoc. The command-line options are:</p>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-a <value></code>, <code>--access <value></code></td>
<td>Only display symbols with the given <code>access</code> property: <code>private</code>, <code>protected</code>, <code>public</code>, or
<code>undefined</code>, or <code>all</code> for all access levels. By default, all except <code>private</code> symbols are shown.</td>
</tr>
<tr>
<td><code>-c <value></code>, <code>--configure <value></code></td>
<td>The path to a JSDoc <a href="about-configuring-jsdoc.html">configuration file</a>. Defaults to <code>conf.json</code> or
<code>conf.json.EXAMPLE</code> in the directory where JSDoc is installed.</td>
</tr>
<tr>
<td><code>-d <value></code>, <code>--destination <value></code></td>
<td>The path to the output folder for the generated documentation. For JSDoc's built-in Haruki template, use <code>console</code> to dump data to
the console. Defaults to <code>./out</code>.</td>
</tr>
<tr>
<td><code>--debug</code></td>
<td>Log information that can help debug issues in JSDoc itself.</td>
</tr>
<tr>
<td><code>-e <value></code>, <code>--encoding <value></code></td>
<td>Assume this encoding when reading all source files. Defaults to <code>utf8</code>.</td>
</tr>
<tr>
<td><code>-h</code>, <code>--help</code></td>
<td>Display information about JSDoc's command-line options, then exit.</td>
</tr>
<tr>
<td><code>--match <value></code></td>
<td>Only run tests whose names contain <code>value</code>.</td>
</tr>
<tr>
<td><code>--nocolor</code></td>
<td>When running tests, do not use color in the console output. On Windows, this option is enabled by default.</td>
</tr>
<tr>
<td><code>-p</code>, <code>--private</code></td>
<td>Include symbols marked with the <a href="tags-private.html"><code>@private</code> tag</a> in the generated documentation. By default, private
symbols are not included.</td>
</tr>
<tr>
<td><code>-P</code>, <code>--package</code></td>
<td>The <code>package.json</code> file that contains the project name, version, and other details. Defaults to the first <code>package.json</code>
file found in the source paths.</td>
</tr>
<tr>
<td><code>--pedantic</code></td>
<td>Treat errors as fatal errors, and treat warnings as errors. Defaults to <code>false</code>.</td>
</tr>
<tr>
<td><code>-q <value></code>, <code>--query <value></code></td>
<td>A query string to parse and store in the global variable <code>env.opts.query</code>. Example: <code>foo=bar&baz=true</code>.</td>
</tr>
<tr>
<td><code>-r</code>, <code>--recurse</code></td>
<td>Recurse into subdirectories when scanning for source files and tutorials.</td>
</tr>
<tr>
<td><code>-R</code>, <code>--readme</code></td>
<td>The <code>README.md</code> file to include in the generated documentation. Defaults to the first <code>README.md</code> file found in the source
paths.</td>
</tr>
<tr>
<td><code>-t <value></code>, <code>--template <value></code></td>
<td>The path to the template to use for generating output. Defaults to <code>templates/default</code>, JSDoc's built-in default template.</td>
</tr>
<tr>
<td><code>-T</code>, <code>--test</code></td>
<td>Run JSDoc's test suite, and print the results to the console.</td>
</tr>
<tr>
<td><code>-u <value></code>, <code>--tutorials <value></code></td>
<td>Directory in which JSDoc should search for tutorials. If omitted, no tutorial pages will be generated. See the <a
href="about-tutorials.html">tutorial instructions</a> for more information.</td>
</tr>
<tr>
<td><code>-v</code>, <code>--version</code></td>
<td>Displays JSDoc's version number, then exits.</td>
</tr>
<tr>
<td><code>--verbose</code></td>
<td>Log detailed information to the console as JSDoc runs. Defaults to <code>false</code>.</td>
</tr>
<tr>
<td><code>-X</code>, <code>--explain</code></td>
<td>Dump all doclets to the console in JSON format, then exit.</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<p>Generate documentation for files in the <code>./src</code> directory, using the configuration file
<code>/path/to/my/conf.json</code>, and save the output in the <code>./docs</code> directory:</p>
<figure>
<pre class="prettyprint"><code>/path/to/jsdoc src -r -c /path/to/my/conf.json -d docs
</code></pre>
</figure>
<p>Run all JSDoc tests whose names include the word <code>tag</code>, and log information about each test:</p>
<figure>
<pre class="prettyprint"><code>/path/to/jsdoc -T --match tag --verbose
</code></pre>
</figure>
<h2 id="related-links">Related Links</h2>
<p>
<a href="about-configuring-jsdoc.html">Configuring JSDoc with a configuration file</a>
</p>
</article>
<footer>
<a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/">
<img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a>
<br>
Copyright © 2011-2019 the
<a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the
JSDoc 3 documentation project.
<br>
This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is
licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
</footer>
<p>
<a href="https://github.com/jsdoc3/jsdoc" class="github-ribbon">Fork me on GitHub</a>
</p>
<script type="text/javascript">
prettyPrint();
</script>
</body>
</html>