22
33### Table of Contents
44
5- * [ lint] [ 1 ]
6- * [ Parameters] [ 2 ]
7- * [ Examples] [ 3 ]
8- * [ build] [ 4 ]
9- * [ Parameters] [ 5 ]
10- * [ Examples] [ 6 ]
11- * [ formats] [ 7 ]
12- * [ formats.html] [ 8 ]
13- * [ Parameters] [ 9 ]
14- * [ Examples] [ 10 ]
15- * [ formats.markdown] [ 11 ]
16- * [ Parameters] [ 12 ]
17- * [ Examples] [ 13 ]
18- * [ formats.json] [ 14 ]
19- * [ Parameters] [ 15 ]
20- * [ Examples] [ 16 ]
5+ - [ lint] [ 1 ]
6+ - [ Parameters] [ 2 ]
7+ - [ Examples] [ 3 ]
8+ - [ build] [ 4 ]
9+ - [ Parameters] [ 5 ]
10+ - [ Examples] [ 6 ]
11+ - [ formats] [ 7 ]
12+ - [ formats.html] [ 8 ]
13+ - [ Parameters] [ 9 ]
14+ - [ Examples] [ 10 ]
15+ - [ formats.markdown] [ 11 ]
16+ - [ Parameters] [ 12 ]
17+ - [ Examples] [ 13 ]
18+ - [ formats.json] [ 14 ]
19+ - [ Parameters] [ 15 ]
20+ - [ Examples] [ 16 ]
2121
2222## lint
2323
@@ -27,20 +27,20 @@ of lint information intended for human-readable output.
2727
2828### Parameters
2929
30- * ` indexes ` ** ([ Array] [ 17 ] <[ string] [ 18 ] > | [ string] [ 18 ] )** files to process
31- * ` args ` ** [ Object] [ 19 ] ** args
32-
33- * ` args.external ` ** [ Array] [ 17 ] <[ string] [ 18 ] >** a string regex / glob match pattern
34- that defines what external modules will be whitelisted and included in the
35- generated documentation.
36- * ` args.shallow ` ** [ boolean] [ 20 ] ** whether to avoid dependency parsing
37- even in JavaScript code. (optional, default ` false ` )
38- * ` args.inferPrivate ` ** [ string] [ 18 ] ?** a valid regular expression string
39- to infer whether a code element should be private, given its naming structure.
40- For instance, you can specify ` inferPrivate: '^_' ` to automatically treat
41- methods named like ` _myMethod ` as private.
42- * ` args.extension ` ** ([ string] [ 18 ] | [ Array] [ 17 ] <[ string] [ 18 ] >)?** treat additional file extensions
43- as JavaScript, extending the default set of ` js ` , ` es6 ` , and ` jsx ` .
30+ - ` indexes ` ** ([ Array] [ 17 ] <[ string] [ 18 ] > | [ string] [ 18 ] )** files to process
31+ - ` args ` ** [ Object] [ 19 ] ** args
32+
33+ - ` args.external ` ** [ Array] [ 17 ] <[ string] [ 18 ] >** a string regex / glob match pattern
34+ that defines what external modules will be whitelisted and included in the
35+ generated documentation.
36+ - ` args.shallow ` ** [ boolean] [ 20 ] ** whether to avoid dependency parsing
37+ even in JavaScript code.&#x 20 ; (optional, default ` false ` )
38+ - ` args.inferPrivate ` ** [ string] [ 18 ] ?** a valid regular expression string
39+ to infer whether a code element should be private, given its naming structure.
40+ For instance, you can specify ` inferPrivate: '^_' ` to automatically treat
41+ methods named like ` _myMethod ` as private.
42+ - ` args.extension ` ** ([ string] [ 18 ] | [ Array] [ 17 ] <[ string] [ 18 ] >)?** treat additional file extensions
43+ as JavaScript, extending the default set of ` js ` , ` es6 ` , and ` jsx ` .
4444
4545### Examples
4646
@@ -64,42 +64,45 @@ comments, given a root file as a path.
6464
6565### Parameters
6666
67- * ` indexes ` ** ([ Array] [ 17 ] <[ string] [ 18 ] > | [ string] [ 18 ] )** files to process
68- * ` args ` ** [ Object] [ 19 ] ** args
69-
70- * ` args.external ` ** [ Array] [ 17 ] <[ string] [ 18 ] >** a string regex / glob match pattern
71- that defines what external modules will be whitelisted and included in the
72- generated documentation.
73- * ` args.shallow ` ** [ boolean] [ 20 ] ** whether to avoid dependency parsing
74- even in JavaScript code. (optional, default ` false ` )
75- * ` args.order ` ** [ Array] [ 17 ] <([ string] [ 18 ] | [ Object] [ 19 ] )>** optional array that
76- defines sorting order of documentation (optional, default ` [] ` )
77- * ` args.access ` ** [ Array] [ 17 ] <[ string] [ 18 ] >** an array of access levels
78- to output in documentation (optional, default ` [] ` )
79- * ` args.hljs ` ** [ Object] [ 19 ] ?** hljs optional args
80-
81- * ` args.hljs.highlightAuto ` ** [ boolean] [ 20 ] ** hljs automatically detect language (optional, default ` false ` )
82- * ` args.hljs.languages ` ** [ Array] [ 17 ] ?** languages for hljs to choose from
83- * ` args.inferPrivate ` ** [ string] [ 18 ] ?** a valid regular expression string
84- to infer whether a code element should be private, given its naming structure.
85- For instance, you can specify ` inferPrivate: '^_' ` to automatically treat
86- methods named like ` _myMethod ` as private.
87- * ` args.extension ` ** ([ string] [ 18 ] | [ Array] [ 17 ] <[ string] [ 18 ] >)?** treat additional file extensions
88- as JavaScript, extending the default set of ` js ` , ` es6 ` , and ` jsx ` .
67+ - ` indexes ` ** ([ Array] [ 17 ] <[ string] [ 18 ] > | [ string] [ 18 ] )** files to process
68+ - ` args ` ** [ Object] [ 19 ] ** args
69+
70+ - ` args.external ` ** [ Array] [ 17 ] <[ string] [ 18 ] >** a string regex / glob match pattern
71+ that defines what external modules will be whitelisted and included in the
72+ generated documentation.
73+ - ` args.shallow ` ** [ boolean] [ 20 ] ** whether to avoid dependency parsing
74+ even in JavaScript code.  ; (optional, default ` false ` )
75+ - ` args.order ` ** [ Array] [ 17 ] <([ string] [ 18 ] | [ Object] [ 19 ] )>** optional array that
76+ defines sorting order of documentation  ; (optional, default ` [] ` )
77+ - ` args.access ` ** [ Array] [ 17 ] <[ string] [ 18 ] >** an array of access levels
78+ to output in documentation  ; (optional, default ` [] ` )
79+ - ` args.hljs ` ** [ Object] [ 19 ] ?** hljs optional args
80+
81+ - ` args.hljs.highlightAuto ` ** [ boolean] [ 20 ] ** hljs automatically detect language  ; (optional, default ` false ` )
82+ - ` args.hljs.languages ` ** [ Array] [ 17 ] ?** languages for hljs to choose from
83+
84+ - ` args.inferPrivate ` ** [ string] [ 18 ] ?** a valid regular expression string
85+ to infer whether a code element should be private, given its naming structure.
86+ For instance, you can specify ` inferPrivate: '^_' ` to automatically treat
87+ methods named like ` _myMethod ` as private.
88+ - ` args.extension ` ** ([ string] [ 18 ] | [ Array] [ 17 ] <[ string] [ 18 ] >)?** treat additional file extensions
89+ as JavaScript, extending the default set of ` js ` , ` es6 ` , and ` jsx ` .
8990
9091### Examples
9192
9293``` javascript
9394var documentation = require (' documentation' );
9495
95- documentation .build ([' index.js' ], {
96- // only output comments with an explicit @public tag
97- access: [' public' ]
98- }).then (res => {
99- // res is an array of parsed comments with inferred properties
100- // and more: everything you need to build documentation or
101- // any other kind of code data.
102- });
96+ documentation
97+ .build ([' index.js' ], {
98+ // only output comments with an explicit @public tag
99+ access: [' public' ]
100+ })
101+ .then (res => {
102+ // res is an array of parsed comments with inferred properties
103+ // and more: everything you need to build documentation or
104+ // any other kind of code data.
105+ });
103106```
104107
105108Returns ** [ Promise] [ 21 ] ** results
@@ -117,17 +120,18 @@ Formats documentation as HTML.
117120
118121### Parameters
119122
120- * ` comments ` ** [ Array] [ 17 ] <[ Comment] [ 22 ] >** parsed comments
121- * ` config ` ** [ Object] [ 19 ] ** Options that can customize the output
123+ - ` comments ` ** [ Array] [ 17 ] <[ Comment] [ 22 ] >** parsed comments
124+ - ` config ` ** [ Object] [ 19 ] ** Options that can customize the output
122125
123- * ` config.theme ` ** [ string] [ 18 ] ** Name of a module used for an HTML theme. (optional, default ` 'default_theme' ` )
126+ - ` config.theme ` ** [ string] [ 18 ] ** Name of a module used for an HTML theme.&#x 20 ; (optional, default ` 'default_theme' ` )
124127
125128### Examples
126129
127130``` javascript
128131var documentation = require (' documentation' );
129132
130- documentation .build ([' index.js' ])
133+ documentation
134+ .build ([' index.js' ])
131135 .then (documentation .formats .html );
132136```
133137
@@ -140,16 +144,17 @@ Formats documentation as
140144
141145### Parameters
142146
143- * ` comments ` ** [ Array] [ 17 ] <[ Object] [ 19 ] >** parsed comments
144- * ` args ` ** [ Object] [ 19 ] ** Options that can customize the output
147+ - ` comments ` ** [ Array] [ 17 ] <[ Object] [ 19 ] >** parsed comments
148+ - ` args ` ** [ Object] [ 19 ] ** Options that can customize the output
145149
146150### Examples
147151
148152``` javascript
149153var documentation = require (' documentation' );
150154var fs = require (' fs' );
151155
152- documentation .build ([' index.js' ])
156+ documentation
157+ .build ([' index.js' ])
153158 .then (documentation .formats .md )
154159 .then (output => {
155160 // output is a string of Markdown data
@@ -165,66 +170,45 @@ Formats documentation as a JSON string.
165170
166171### Parameters
167172
168- * ` comments ` ** [ Array] [ 17 ] <[ Comment] [ 22 ] >** parsed comments
173+ - ` comments ` ** [ Array] [ 17 ] <[ Comment] [ 22 ] >** parsed comments
169174
170175### Examples
171176
172177``` javascript
173178var documentation = require (' documentation' );
174179var fs = require (' fs' );
175180
176- documentation .build ([' index.js' ])
181+ documentation
182+ .build ([' index.js' ])
177183 .then (documentation .formats .json )
178184 .then (output => {
179185 // output is a string of JSON data
180186 fs .writeFileSync (' ./output.json' , output);
181187 });
182188```
183189
184- Returns ** [ Promise] [ 21 ] <[ string] [ 18 ] >**
190+ Returns ** [ Promise] [ 21 ] <[ string] [ 18 ] >** &#x 20 ;
185191
186192[ 1 ] : #lint
187-
188193[ 2 ] : #parameters
189-
190194[ 3 ] : #examples
191-
192195[ 4 ] : #build
193-
194196[ 5 ] : #parameters-1
195-
196197[ 6 ] : #examples-1
197-
198198[ 7 ] : #formats
199-
200199[ 8 ] : #formatshtml
201-
202200[ 9 ] : #parameters-2
203-
204201[ 10 ] : #examples-2
205-
206202[ 11 ] : #formatsmarkdown
207-
208203[ 12 ] : #parameters-3
209-
210204[ 13 ] : #examples-3
211-
212205[ 14 ] : #formatsjson
213-
214206[ 15 ] : #parameters-4
215-
216207[ 16 ] : #examples-4
217-
218208[ 17 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
219-
220209[ 18 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
221-
222210[ 19 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
223-
224211[ 20 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
225-
226212[ 21 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
227-
228213[ 22 ] : https://developer.mozilla.org/docs/Web/API/Comment/Comment
229-
230214[ 23 ] : https://daringfireball.net/projects/markdown/
0 commit comments