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,10 +120,10 @@ 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
@@ -129,7 +132,8 @@ var documentation = require('documentation');
129132var streamArray = require (' stream-array' );
130133var vfs = require (' vinyl-fs' );
131134
132- documentation .build ([' index.js' ])
135+ documentation
136+ .build ([' index.js' ])
133137 .then (documentation .formats .html )
134138 .then (output => {
135139 streamArray (output).pipe (vfs .dest (' ./output-directory' ));
@@ -145,16 +149,17 @@ Formats documentation as
145149
146150### Parameters
147151
148- * ` comments ` ** [ Array] [ 17 ] <[ Object] [ 19 ] >** parsed comments
149- * ` args ` ** [ Object] [ 19 ] ** Options that can customize the output
152+ - ` comments ` ** [ Array] [ 17 ] <[ Object] [ 19 ] >** parsed comments
153+ - ` args ` ** [ Object] [ 19 ] ** Options that can customize the output
150154
151155### Examples
152156
153157``` javascript
154158var documentation = require (' documentation' );
155159var fs = require (' fs' );
156160
157- documentation .build ([' index.js' ])
161+ documentation
162+ .build ([' index.js' ])
158163 .then (documentation .formats .md )
159164 .then (output => {
160165 // output is a string of Markdown data
@@ -170,66 +175,45 @@ Formats documentation as a JSON string.
170175
171176### Parameters
172177
173- * ` comments ` ** [ Array] [ 17 ] <[ Comment] [ 22 ] >** parsed comments
178+ - ` comments ` ** [ Array] [ 17 ] <[ Comment] [ 22 ] >** parsed comments
174179
175180### Examples
176181
177182``` javascript
178183var documentation = require (' documentation' );
179184var fs = require (' fs' );
180185
181- documentation .build ([' index.js' ])
186+ documentation
187+ .build ([' index.js' ])
182188 .then (documentation .formats .json )
183189 .then (output => {
184190 // output is a string of JSON data
185191 fs .writeFileSync (' ./output.json' , output);
186192 });
187193```
188194
189- Returns ** [ Promise] [ 21 ] <[ string] [ 18 ] >**
195+ Returns ** [ Promise] [ 21 ] <[ string] [ 18 ] >** &#x 20 ;
190196
191197[ 1 ] : #lint
192-
193198[ 2 ] : #parameters
194-
195199[ 3 ] : #examples
196-
197200[ 4 ] : #build
198-
199201[ 5 ] : #parameters-1
200-
201202[ 6 ] : #examples-1
202-
203203[ 7 ] : #formats
204-
205204[ 8 ] : #formatshtml
206-
207205[ 9 ] : #parameters-2
208-
209206[ 10 ] : #examples-2
210-
211207[ 11 ] : #formatsmarkdown
212-
213208[ 12 ] : #parameters-3
214-
215209[ 13 ] : #examples-3
216-
217210[ 14 ] : #formatsjson
218-
219211[ 15 ] : #parameters-4
220-
221212[ 16 ] : #examples-4
222-
223213[ 17 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
224-
225214[ 18 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
226-
227215[ 19 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
228-
229216[ 20 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
230-
231217[ 21 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
232-
233218[ 22 ] : https://developer.mozilla.org/docs/Web/API/Comment/Comment
234-
235219[ 23 ] : https://daringfireball.net/projects/markdown/
0 commit comments