podlite 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2172 +0,0 @@
1
- <!-- Generated by documentation.js. Update this documentation by updating the source code. -->
2
-
3
- ### Table of Contents
4
-
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]
21
-
22
- ## lint
23
-
24
- Lint files for non-standard or incorrect documentation
25
- information, returning a potentially-empty string
26
- of lint information intended for human-readable output.
27
-
28
- ### SParameterssss
29
-
30
- - `indexes` **([Array][17]&lt;[string][18]> | [string][18])** files to process
31
- - `args` **[Object][19]** args
32
- - `args.external` **[Array][17]&lt;[string][18]>** a string regex / glob match pattern
33
- that defines what external modules will be whitelisted and included in the
34
- generated documentation.
35
- - `args.shallow` **[boolean][20]** whether to avoid dependency parsing
36
- even in JavaScript code. (optional, default `false`)
37
- - `args.inferPrivate` **[string][18]?** a valid regular expression string
38
- to infer whether a code element should be private, given its naming structure.
39
- For instance, you can specify `inferPrivate: '^_'` to automatically treat
40
- methods named like `_myMethod` as private.
41
- - `args.extension` **([string][18] \| [Array][17]&lt;[string][18]>)?** treat additional file extensions
42
- as JavaScript, extending the default set of `js`, `es6`, and `jsx`.
43
-
44
- ### Examples
45
-
46
- ```javascript
47
- documentation.lint('file.js').then(lintOutput => {
48
- if (lintOutput) {
49
- console.log(lintOutput);
50
- process.exit(1);
51
- } else {
52
- process.exit(0);
53
- }
54
- });
55
- ```
56
-
57
- Returns **[Promise][21]** promise with lint results
58
-
59
- ## build
60
-
61
- Generate JavaScript documentation as a list of parsed JSDoc
62
- comments, given a root file as a path.
63
-
64
- ### Parameters
65
-
66
- - `indexes` **([Array][17]&lt;[string][18]> | [string][18])** files to process
67
- - `args` **[Object][19]** args
68
- - `args.external` **[Array][17]&lt;[string][18]>** a string regex / glob match pattern
69
- that defines what external modules will be whitelisted and included in the
70
- generated documentation.
71
- - `args.shallow` **[boolean][20]** whether to avoid dependency parsing
72
- even in JavaScript code. (optional, default `false`)
73
- - `args.order` **[Array][17]&lt;([string][18] \| [Object][19])>** optional array that
74
- defines sorting order of documentation (optional, default `[]`)
75
- - `args.access` **[Array][17]&lt;[string][18]>** an array of access levels
76
- to output in documentation (optional, default `[]`)
77
- - `args.hljs` **[Object][19]?** hljs optional args
78
- - `args.hljs.highlightAuto` **[boolean][20]** hljs automatically detect language (optional, default `false`)
79
- - `args.hljs.languages` **[Array][17]?** languages for hljs to choose from
80
- - `args.inferPrivate` **[string][18]?** a valid regular expression string
81
- to infer whether a code element should be private, given its naming structure.
82
- For instance, you can specify `inferPrivate: '^_'` to automatically treat
83
- methods named like `_myMethod` as private.
84
- - `args.extension` **([string][18] \| [Array][17]&lt;[string][18]>)?** treat additional file extensions
85
- as JavaScript, extending the default set of `js`, `es6`, and `jsx`.
86
-
87
- ### Examples
88
-
89
- ```javascript
90
- var documentation = require('documentation');
91
-
92
- documentation.build(['index.js'], {
93
- // only output comments with an explicit @public tag
94
- access: ['public']
95
- }).then(res => {
96
- // res is an array of parsed comments with inferred properties
97
- // and more: everything you need to build documentation or
98
- // any other kind of code data.
99
- });
100
- ```
101
-
102
- Returns **[Promise][21]** results
103
-
104
- ## formats
105
-
106
- Documentation's formats are modular methods that take comments
107
- and config as input and return Promises with results,
108
- like stringified JSON, markdown strings, or Vinyl objects for HTML
109
- output.
110
-
111
- ## formats.html
112
-
113
- Formats documentation as HTML.
114
-
115
- ### Parameters
116
-
117
- - `comments` **[Array][17]&lt;[Comment][22]>** parsed comments
118
- - `config` **[Object][19]** Options that can customize the output
119
- - `config.theme` **[string][18]** Name of a module used for an HTML theme. (optional, default `'default_theme'`)
120
-
121
- ### Examples
122
-
123
- ```javascript
124
- var documentation = require('documentation');
125
- var streamArray = require('stream-array');
126
- var vfs = require('vinyl-fs');
127
-
128
- documentation.build(['index.js'])
129
- .then(documentation.formats.html)
130
- .then(output => {
131
- streamArray(output).pipe(vfs.dest('./output-directory'));
132
- });
133
- ```
134
-
135
- Returns **[Promise][21]&lt;[Array][17]&lt;[Object][19]>>** Promise with results
136
-
137
- ## formats.markdown
138
-
139
- Formats documentation as
140
- [Markdown][23].
141
-
142
- ### Parameters
143
-
144
- - `comments` **[Array][17]&lt;[Object][19]>** parsed comments
145
- - `args` **[Object][19]** Options that can customize the output
146
-
147
- ### Examples
148
-
149
- ```javascript
150
- var documentation = require('documentation');
151
- var fs = require('fs');
152
-
153
- documentation.build(['index.js'])
154
- .then(documentation.formats.md)
155
- .then(output => {
156
- // output is a string of Markdown data
157
- fs.writeFileSync('./output.md', output);
158
- });
159
- ```
160
-
161
- Returns **[Promise][21]&lt;[string][18]>** a promise of the eventual value
162
-
163
- ## formats.json
164
-
165
- Formats documentation as a JSON string.
166
-
167
- ### Parameters
168
-
169
- - `comments` **[Array][17]&lt;[Comment][22]>** parsed comments
170
-
171
- ### Examples
172
-
173
- ```javascript
174
- var documentation = require('documentation');
175
- var fs = require('fs');
176
-
177
- documentation.build(['index.js'])
178
- .then(documentation.formats.json)
179
- .then(output => {
180
- // output is a string of JSON data
181
- fs.writeFileSync('./output.json', output);
182
- });
183
- ```
184
-
185
- Returns **[Promise][21]&lt;[string][18]>**
186
-
187
- [1]: #lint
188
-
189
- [2]: #parameters
190
-
191
- [3]: #examples
192
-
193
- [4]: #build
194
-
195
- [5]: #parameters-1
196
-
197
- [6]: #examples-1
198
-
199
- [7]: #formats
200
-
201
- [8]: #formatshtml
202
-
203
- [9]: #parameters-2
204
-
205
- [10]: #examples-2
206
-
207
- [11]: #formatsmarkdown
208
-
209
- [12]: #parameters-3
210
-
211
- [13]: #examples-3
212
-
213
- [14]: #formatsjson
214
-
215
- [15]: #parameters-4
216
-
217
- [16]: #examples-4
218
-
219
- [17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
220
-
221
- [18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
222
-
223
- [19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
224
-
225
- [20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
226
-
227
- [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
228
-
229
- [22]: https://developer.mozilla.org/docs/Web/API/Comment/Comment
230
-
231
- [23]: https://daringfireball.net/projects/markdown/
232
-
233
- ~~~~~~~
234
- {
235
- "type": "block",
236
- "name": "pod",
237
- "content": [
238
- {
239
- "type": "block",
240
- "name": "Html",
241
- "content": [
242
- {
243
- "type": "verbatim",
244
- "value": "<!-- Generated by documentation.js. Update this documentation by updating the source code. -->"
245
- }
246
- ]
247
- },
248
- {
249
- "type": "block",
250
- "level": 3,
251
- "name": "head",
252
- "content": [
253
- "Table of Contents"
254
- ]
255
- },
256
- {
257
- "type": "list",
258
- "level": 1,
259
- "list": "itemized",
260
- "content": [
261
- {
262
- "type": "block",
263
- "name": "item",
264
- "level": 1,
265
- "content": [
266
- {
267
- "type": "para",
268
- "content": [
269
- {
270
- "meta": "#lint",
271
- "type": "fcode",
272
- "name": "L",
273
- "content": [
274
- "lint"
275
- ]
276
- }
277
- ]
278
- },
279
- {
280
- "type": "list",
281
- "level": 2,
282
- "list": "itemized",
283
- "content": [
284
- {
285
- "type": "block",
286
- "name": "item",
287
- "level": 2,
288
- "content": [
289
- {
290
- "type": "para",
291
- "content": [
292
- {
293
- "meta": "#parameters",
294
- "type": "fcode",
295
- "name": "L",
296
- "content": [
297
- "Parameters"
298
- ]
299
- }
300
- ]
301
- }
302
- ]
303
- },
304
- {
305
- "type": "block",
306
- "name": "item",
307
- "level": 2,
308
- "content": [
309
- {
310
- "type": "para",
311
- "content": [
312
- {
313
- "meta": "#examples",
314
- "type": "fcode",
315
- "name": "L",
316
- "content": [
317
- "Examples"
318
- ]
319
- }
320
- ]
321
- }
322
- ]
323
- }
324
- ]
325
- }
326
- ]
327
- },
328
- {
329
- "type": "block",
330
- "name": "item",
331
- "level": 1,
332
- "content": [
333
- {
334
- "type": "para",
335
- "content": [
336
- {
337
- "meta": "#build",
338
- "type": "fcode",
339
- "name": "L",
340
- "content": [
341
- "build"
342
- ]
343
- }
344
- ]
345
- },
346
- {
347
- "type": "list",
348
- "level": 2,
349
- "list": "itemized",
350
- "content": [
351
- {
352
- "type": "block",
353
- "name": "item",
354
- "level": 2,
355
- "content": [
356
- {
357
- "type": "para",
358
- "content": [
359
- {
360
- "meta": "#parameters-1",
361
- "type": "fcode",
362
- "name": "L",
363
- "content": [
364
- "Parameters"
365
- ]
366
- }
367
- ]
368
- }
369
- ]
370
- },
371
- {
372
- "type": "block",
373
- "name": "item",
374
- "level": 2,
375
- "content": [
376
- {
377
- "type": "para",
378
- "content": [
379
- {
380
- "meta": "#examples-1",
381
- "type": "fcode",
382
- "name": "L",
383
- "content": [
384
- "Examples"
385
- ]
386
- }
387
- ]
388
- }
389
- ]
390
- }
391
- ]
392
- }
393
- ]
394
- },
395
- {
396
- "type": "block",
397
- "name": "item",
398
- "level": 1,
399
- "content": [
400
- {
401
- "type": "para",
402
- "content": [
403
- {
404
- "meta": "#formats",
405
- "type": "fcode",
406
- "name": "L",
407
- "content": [
408
- "formats"
409
- ]
410
- }
411
- ]
412
- }
413
- ]
414
- },
415
- {
416
- "type": "block",
417
- "name": "item",
418
- "level": 1,
419
- "content": [
420
- {
421
- "type": "para",
422
- "content": [
423
- {
424
- "meta": "#formatshtml",
425
- "type": "fcode",
426
- "name": "L",
427
- "content": [
428
- "formats.html"
429
- ]
430
- }
431
- ]
432
- },
433
- {
434
- "type": "list",
435
- "level": 2,
436
- "list": "itemized",
437
- "content": [
438
- {
439
- "type": "block",
440
- "name": "item",
441
- "level": 2,
442
- "content": [
443
- {
444
- "type": "para",
445
- "content": [
446
- {
447
- "meta": "#parameters-2",
448
- "type": "fcode",
449
- "name": "L",
450
- "content": [
451
- "Parameters"
452
- ]
453
- }
454
- ]
455
- }
456
- ]
457
- },
458
- {
459
- "type": "block",
460
- "name": "item",
461
- "level": 2,
462
- "content": [
463
- {
464
- "type": "para",
465
- "content": [
466
- {
467
- "meta": "#examples-2",
468
- "type": "fcode",
469
- "name": "L",
470
- "content": [
471
- "Examples"
472
- ]
473
- }
474
- ]
475
- }
476
- ]
477
- }
478
- ]
479
- }
480
- ]
481
- },
482
- {
483
- "type": "block",
484
- "name": "item",
485
- "level": 1,
486
- "content": [
487
- {
488
- "type": "para",
489
- "content": [
490
- {
491
- "meta": "#formatsmarkdown",
492
- "type": "fcode",
493
- "name": "L",
494
- "content": [
495
- "formats.markdown"
496
- ]
497
- }
498
- ]
499
- },
500
- {
501
- "type": "list",
502
- "level": 2,
503
- "list": "itemized",
504
- "content": [
505
- {
506
- "type": "block",
507
- "name": "item",
508
- "level": 2,
509
- "content": [
510
- {
511
- "type": "para",
512
- "content": [
513
- {
514
- "meta": "#parameters-3",
515
- "type": "fcode",
516
- "name": "L",
517
- "content": [
518
- "Parameters"
519
- ]
520
- }
521
- ]
522
- }
523
- ]
524
- },
525
- {
526
- "type": "block",
527
- "name": "item",
528
- "level": 2,
529
- "content": [
530
- {
531
- "type": "para",
532
- "content": [
533
- {
534
- "meta": "#examples-3",
535
- "type": "fcode",
536
- "name": "L",
537
- "content": [
538
- "Examples"
539
- ]
540
- }
541
- ]
542
- }
543
- ]
544
- }
545
- ]
546
- }
547
- ]
548
- },
549
- {
550
- "type": "block",
551
- "name": "item",
552
- "level": 1,
553
- "content": [
554
- {
555
- "type": "para",
556
- "content": [
557
- {
558
- "meta": "#formatsjson",
559
- "type": "fcode",
560
- "name": "L",
561
- "content": [
562
- "formats.json"
563
- ]
564
- }
565
- ]
566
- },
567
- {
568
- "type": "list",
569
- "level": 2,
570
- "list": "itemized",
571
- "content": [
572
- {
573
- "type": "block",
574
- "name": "item",
575
- "level": 2,
576
- "content": [
577
- {
578
- "type": "para",
579
- "content": [
580
- {
581
- "meta": "#parameters-4",
582
- "type": "fcode",
583
- "name": "L",
584
- "content": [
585
- "Parameters"
586
- ]
587
- }
588
- ]
589
- }
590
- ]
591
- },
592
- {
593
- "type": "block",
594
- "name": "item",
595
- "level": 2,
596
- "content": [
597
- {
598
- "type": "para",
599
- "content": [
600
- {
601
- "meta": "#examples-4",
602
- "type": "fcode",
603
- "name": "L",
604
- "content": [
605
- "Examples"
606
- ]
607
- }
608
- ]
609
- }
610
- ]
611
- }
612
- ]
613
- }
614
- ]
615
- }
616
- ]
617
- },
618
- {
619
- "type": "block",
620
- "level": 2,
621
- "name": "head",
622
- "content": [
623
- "lint"
624
- ]
625
- },
626
- {
627
- "type": "para",
628
- "content": [
629
- "Lint files for non-standard or incorrect documentation\ninformation, returning a potentially-empty string\nof lint information intended for human-readable output."
630
- ]
631
- },
632
- {
633
- "type": "block",
634
- "level": 3,
635
- "name": "head",
636
- "content": [
637
- "SParameterssss"
638
- ]
639
- },
640
- {
641
- "type": "list",
642
- "level": 1,
643
- "list": "itemized",
644
- "content": [
645
- {
646
- "type": "block",
647
- "name": "item",
648
- "level": 1,
649
- "content": [
650
- {
651
- "type": "para",
652
- "content": [
653
- {
654
- "type": "fcode",
655
- "name": "C",
656
- "content": [
657
- "indexes"
658
- ]
659
- },
660
- " ",
661
- {
662
- "type": "fcode",
663
- "name": "B",
664
- "content": [
665
- "(",
666
- {
667
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
668
- "type": "fcode",
669
- "name": "L",
670
- "content": [
671
- "Array"
672
- ]
673
- },
674
- "<",
675
- {
676
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
677
- "type": "fcode",
678
- "name": "L",
679
- "content": [
680
- "string"
681
- ]
682
- },
683
- "> | ",
684
- {
685
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
686
- "type": "fcode",
687
- "name": "L",
688
- "content": [
689
- "string"
690
- ]
691
- },
692
- ")"
693
- ]
694
- },
695
- " files to process"
696
- ]
697
- }
698
- ]
699
- },
700
- {
701
- "type": "block",
702
- "name": "item",
703
- "level": 1,
704
- "content": [
705
- {
706
- "type": "para",
707
- "content": [
708
- {
709
- "type": "fcode",
710
- "name": "C",
711
- "content": [
712
- "args"
713
- ]
714
- },
715
- " ",
716
- {
717
- "type": "fcode",
718
- "name": "B",
719
- "content": [
720
- {
721
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
722
- "type": "fcode",
723
- "name": "L",
724
- "content": [
725
- "Object"
726
- ]
727
- }
728
- ]
729
- },
730
- " args"
731
- ]
732
- },
733
- {
734
- "type": "list",
735
- "level": 2,
736
- "list": "itemized",
737
- "content": [
738
- {
739
- "type": "block",
740
- "name": "item",
741
- "level": 2,
742
- "content": [
743
- {
744
- "type": "para",
745
- "content": [
746
- {
747
- "type": "fcode",
748
- "name": "C",
749
- "content": [
750
- "args.external"
751
- ]
752
- },
753
- " ",
754
- {
755
- "type": "fcode",
756
- "name": "B",
757
- "content": [
758
- {
759
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
760
- "type": "fcode",
761
- "name": "L",
762
- "content": [
763
- "Array"
764
- ]
765
- },
766
- "<",
767
- {
768
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
769
- "type": "fcode",
770
- "name": "L",
771
- "content": [
772
- "string"
773
- ]
774
- },
775
- ">"
776
- ]
777
- },
778
- " a string regex / glob match pattern\nthat defines what external modules will be whitelisted and included in the\ngenerated documentation."
779
- ]
780
- }
781
- ]
782
- },
783
- {
784
- "type": "block",
785
- "name": "item",
786
- "level": 2,
787
- "content": [
788
- {
789
- "type": "para",
790
- "content": [
791
- {
792
- "type": "fcode",
793
- "name": "C",
794
- "content": [
795
- "args.shallow"
796
- ]
797
- },
798
- " ",
799
- {
800
- "type": "fcode",
801
- "name": "B",
802
- "content": [
803
- {
804
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
805
- "type": "fcode",
806
- "name": "L",
807
- "content": [
808
- "boolean"
809
- ]
810
- }
811
- ]
812
- },
813
- " whether to avoid dependency parsing\neven in JavaScript code. (optional, default ",
814
- {
815
- "type": "fcode",
816
- "name": "C",
817
- "content": [
818
- "false"
819
- ]
820
- },
821
- ")"
822
- ]
823
- }
824
- ]
825
- },
826
- {
827
- "type": "block",
828
- "name": "item",
829
- "level": 2,
830
- "content": [
831
- {
832
- "type": "para",
833
- "content": [
834
- {
835
- "type": "fcode",
836
- "name": "C",
837
- "content": [
838
- "args.inferPrivate"
839
- ]
840
- },
841
- " ",
842
- {
843
- "type": "fcode",
844
- "name": "B",
845
- "content": [
846
- {
847
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
848
- "type": "fcode",
849
- "name": "L",
850
- "content": [
851
- "string"
852
- ]
853
- },
854
- "?"
855
- ]
856
- },
857
- " a valid regular expression string\nto infer whether a code element should be private, given its naming structure.\nFor instance, you can specify ",
858
- {
859
- "type": "fcode",
860
- "name": "C",
861
- "content": [
862
- "inferPrivate: '^_'"
863
- ]
864
- },
865
- " to automatically treat\nmethods named like ",
866
- {
867
- "type": "fcode",
868
- "name": "C",
869
- "content": [
870
- "_myMethod"
871
- ]
872
- },
873
- " as private."
874
- ]
875
- }
876
- ]
877
- },
878
- {
879
- "type": "block",
880
- "name": "item",
881
- "level": 2,
882
- "content": [
883
- {
884
- "type": "para",
885
- "content": [
886
- {
887
- "type": "fcode",
888
- "name": "C",
889
- "content": [
890
- "args.extension"
891
- ]
892
- },
893
- " ",
894
- {
895
- "type": "fcode",
896
- "name": "B",
897
- "content": [
898
- "(",
899
- {
900
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
901
- "type": "fcode",
902
- "name": "L",
903
- "content": [
904
- "string"
905
- ]
906
- },
907
- " ",
908
- "|",
909
- " ",
910
- {
911
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
912
- "type": "fcode",
913
- "name": "L",
914
- "content": [
915
- "Array"
916
- ]
917
- },
918
- "<",
919
- {
920
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
921
- "type": "fcode",
922
- "name": "L",
923
- "content": [
924
- "string"
925
- ]
926
- },
927
- ">)?"
928
- ]
929
- },
930
- " treat additional file extensions\nas JavaScript, extending the default set of ",
931
- {
932
- "type": "fcode",
933
- "name": "C",
934
- "content": [
935
- "js"
936
- ]
937
- },
938
- ", ",
939
- {
940
- "type": "fcode",
941
- "name": "C",
942
- "content": [
943
- "es6"
944
- ]
945
- },
946
- ", and ",
947
- {
948
- "type": "fcode",
949
- "name": "C",
950
- "content": [
951
- "jsx"
952
- ]
953
- },
954
- "."
955
- ]
956
- }
957
- ]
958
- }
959
- ]
960
- }
961
- ]
962
- }
963
- ]
964
- },
965
- {
966
- "type": "block",
967
- "level": 3,
968
- "name": "head",
969
- "content": [
970
- "Examples"
971
- ]
972
- },
973
- {
974
- "type": "block",
975
- "name": "code",
976
- "config": {
977
- "name": "lang",
978
- "value": "lang"
979
- },
980
- "content": [
981
- {
982
- "type": "verbatim",
983
- "value": "documentation.lint('file.js').then(lintOutput => {\n if (lintOutput) {\n console.log(lintOutput);\n process.exit(1);\n } else {\n process.exit(0);\n }\n});"
984
- }
985
- ]
986
- },
987
- {
988
- "type": "para",
989
- "content": [
990
- "Returns ",
991
- {
992
- "type": "fcode",
993
- "name": "B",
994
- "content": [
995
- {
996
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
997
- "type": "fcode",
998
- "name": "L",
999
- "content": [
1000
- "Promise"
1001
- ]
1002
- }
1003
- ]
1004
- },
1005
- " promise with lint results"
1006
- ]
1007
- },
1008
- {
1009
- "type": "block",
1010
- "level": 2,
1011
- "name": "head",
1012
- "content": [
1013
- "build"
1014
- ]
1015
- },
1016
- {
1017
- "type": "para",
1018
- "content": [
1019
- "Generate JavaScript documentation as a list of parsed JSDoc\ncomments, given a root file as a path."
1020
- ]
1021
- },
1022
- {
1023
- "type": "block",
1024
- "level": 3,
1025
- "name": "head",
1026
- "content": [
1027
- "Parameters"
1028
- ]
1029
- },
1030
- {
1031
- "type": "list",
1032
- "level": 1,
1033
- "list": "itemized",
1034
- "content": [
1035
- {
1036
- "type": "block",
1037
- "name": "item",
1038
- "level": 1,
1039
- "content": [
1040
- {
1041
- "type": "para",
1042
- "content": [
1043
- {
1044
- "type": "fcode",
1045
- "name": "C",
1046
- "content": [
1047
- "indexes"
1048
- ]
1049
- },
1050
- " ",
1051
- {
1052
- "type": "fcode",
1053
- "name": "B",
1054
- "content": [
1055
- "(",
1056
- {
1057
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1058
- "type": "fcode",
1059
- "name": "L",
1060
- "content": [
1061
- "Array"
1062
- ]
1063
- },
1064
- "<",
1065
- {
1066
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1067
- "type": "fcode",
1068
- "name": "L",
1069
- "content": [
1070
- "string"
1071
- ]
1072
- },
1073
- "> | ",
1074
- {
1075
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1076
- "type": "fcode",
1077
- "name": "L",
1078
- "content": [
1079
- "string"
1080
- ]
1081
- },
1082
- ")"
1083
- ]
1084
- },
1085
- " files to process"
1086
- ]
1087
- }
1088
- ]
1089
- },
1090
- {
1091
- "type": "block",
1092
- "name": "item",
1093
- "level": 1,
1094
- "content": [
1095
- {
1096
- "type": "para",
1097
- "content": [
1098
- {
1099
- "type": "fcode",
1100
- "name": "C",
1101
- "content": [
1102
- "args"
1103
- ]
1104
- },
1105
- " ",
1106
- {
1107
- "type": "fcode",
1108
- "name": "B",
1109
- "content": [
1110
- {
1111
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
1112
- "type": "fcode",
1113
- "name": "L",
1114
- "content": [
1115
- "Object"
1116
- ]
1117
- }
1118
- ]
1119
- },
1120
- " args"
1121
- ]
1122
- },
1123
- {
1124
- "type": "list",
1125
- "level": 2,
1126
- "list": "itemized",
1127
- "content": [
1128
- {
1129
- "type": "block",
1130
- "name": "item",
1131
- "level": 2,
1132
- "content": [
1133
- {
1134
- "type": "para",
1135
- "content": [
1136
- {
1137
- "type": "fcode",
1138
- "name": "C",
1139
- "content": [
1140
- "args.external"
1141
- ]
1142
- },
1143
- " ",
1144
- {
1145
- "type": "fcode",
1146
- "name": "B",
1147
- "content": [
1148
- {
1149
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1150
- "type": "fcode",
1151
- "name": "L",
1152
- "content": [
1153
- "Array"
1154
- ]
1155
- },
1156
- "<",
1157
- {
1158
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1159
- "type": "fcode",
1160
- "name": "L",
1161
- "content": [
1162
- "string"
1163
- ]
1164
- },
1165
- ">"
1166
- ]
1167
- },
1168
- " a string regex / glob match pattern\nthat defines what external modules will be whitelisted and included in the\ngenerated documentation."
1169
- ]
1170
- }
1171
- ]
1172
- },
1173
- {
1174
- "type": "block",
1175
- "name": "item",
1176
- "level": 2,
1177
- "content": [
1178
- {
1179
- "type": "para",
1180
- "content": [
1181
- {
1182
- "type": "fcode",
1183
- "name": "C",
1184
- "content": [
1185
- "args.shallow"
1186
- ]
1187
- },
1188
- " ",
1189
- {
1190
- "type": "fcode",
1191
- "name": "B",
1192
- "content": [
1193
- {
1194
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
1195
- "type": "fcode",
1196
- "name": "L",
1197
- "content": [
1198
- "boolean"
1199
- ]
1200
- }
1201
- ]
1202
- },
1203
- " whether to avoid dependency parsing\neven in JavaScript code. (optional, default ",
1204
- {
1205
- "type": "fcode",
1206
- "name": "C",
1207
- "content": [
1208
- "false"
1209
- ]
1210
- },
1211
- ")"
1212
- ]
1213
- }
1214
- ]
1215
- },
1216
- {
1217
- "type": "block",
1218
- "name": "item",
1219
- "level": 2,
1220
- "content": [
1221
- {
1222
- "type": "para",
1223
- "content": [
1224
- {
1225
- "type": "fcode",
1226
- "name": "C",
1227
- "content": [
1228
- "args.order"
1229
- ]
1230
- },
1231
- " ",
1232
- {
1233
- "type": "fcode",
1234
- "name": "B",
1235
- "content": [
1236
- {
1237
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1238
- "type": "fcode",
1239
- "name": "L",
1240
- "content": [
1241
- "Array"
1242
- ]
1243
- },
1244
- "<",
1245
- "(",
1246
- {
1247
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1248
- "type": "fcode",
1249
- "name": "L",
1250
- "content": [
1251
- "string"
1252
- ]
1253
- },
1254
- " ",
1255
- "|",
1256
- " ",
1257
- {
1258
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
1259
- "type": "fcode",
1260
- "name": "L",
1261
- "content": [
1262
- "Object"
1263
- ]
1264
- },
1265
- ")>"
1266
- ]
1267
- },
1268
- " optional array that\ndefines sorting order of documentation (optional, default ",
1269
- {
1270
- "type": "fcode",
1271
- "name": "C",
1272
- "content": [
1273
- "[]"
1274
- ]
1275
- },
1276
- ")"
1277
- ]
1278
- }
1279
- ]
1280
- },
1281
- {
1282
- "type": "block",
1283
- "name": "item",
1284
- "level": 2,
1285
- "content": [
1286
- {
1287
- "type": "para",
1288
- "content": [
1289
- {
1290
- "type": "fcode",
1291
- "name": "C",
1292
- "content": [
1293
- "args.access"
1294
- ]
1295
- },
1296
- " ",
1297
- {
1298
- "type": "fcode",
1299
- "name": "B",
1300
- "content": [
1301
- {
1302
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1303
- "type": "fcode",
1304
- "name": "L",
1305
- "content": [
1306
- "Array"
1307
- ]
1308
- },
1309
- "<",
1310
- {
1311
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1312
- "type": "fcode",
1313
- "name": "L",
1314
- "content": [
1315
- "string"
1316
- ]
1317
- },
1318
- ">"
1319
- ]
1320
- },
1321
- " an array of access levels\nto output in documentation (optional, default ",
1322
- {
1323
- "type": "fcode",
1324
- "name": "C",
1325
- "content": [
1326
- "[]"
1327
- ]
1328
- },
1329
- ")"
1330
- ]
1331
- }
1332
- ]
1333
- },
1334
- {
1335
- "type": "block",
1336
- "name": "item",
1337
- "level": 2,
1338
- "content": [
1339
- {
1340
- "type": "para",
1341
- "content": [
1342
- {
1343
- "type": "fcode",
1344
- "name": "C",
1345
- "content": [
1346
- "args.hljs"
1347
- ]
1348
- },
1349
- " ",
1350
- {
1351
- "type": "fcode",
1352
- "name": "B",
1353
- "content": [
1354
- {
1355
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
1356
- "type": "fcode",
1357
- "name": "L",
1358
- "content": [
1359
- "Object"
1360
- ]
1361
- },
1362
- "?"
1363
- ]
1364
- },
1365
- " hljs optional args"
1366
- ]
1367
- },
1368
- {
1369
- "type": "list",
1370
- "level": 3,
1371
- "list": "itemized",
1372
- "content": [
1373
- {
1374
- "type": "block",
1375
- "name": "item",
1376
- "level": 3,
1377
- "content": [
1378
- {
1379
- "type": "para",
1380
- "content": [
1381
- {
1382
- "type": "fcode",
1383
- "name": "C",
1384
- "content": [
1385
- "args.hljs.highlightAuto"
1386
- ]
1387
- },
1388
- " ",
1389
- {
1390
- "type": "fcode",
1391
- "name": "B",
1392
- "content": [
1393
- {
1394
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
1395
- "type": "fcode",
1396
- "name": "L",
1397
- "content": [
1398
- "boolean"
1399
- ]
1400
- }
1401
- ]
1402
- },
1403
- " hljs automatically detect language (optional, default ",
1404
- {
1405
- "type": "fcode",
1406
- "name": "C",
1407
- "content": [
1408
- "false"
1409
- ]
1410
- },
1411
- ")"
1412
- ]
1413
- }
1414
- ]
1415
- },
1416
- {
1417
- "type": "block",
1418
- "name": "item",
1419
- "level": 3,
1420
- "content": [
1421
- {
1422
- "type": "para",
1423
- "content": [
1424
- {
1425
- "type": "fcode",
1426
- "name": "C",
1427
- "content": [
1428
- "args.hljs.languages"
1429
- ]
1430
- },
1431
- " ",
1432
- {
1433
- "type": "fcode",
1434
- "name": "B",
1435
- "content": [
1436
- {
1437
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1438
- "type": "fcode",
1439
- "name": "L",
1440
- "content": [
1441
- "Array"
1442
- ]
1443
- },
1444
- "?"
1445
- ]
1446
- },
1447
- " languages for hljs to choose from"
1448
- ]
1449
- }
1450
- ]
1451
- }
1452
- ]
1453
- }
1454
- ]
1455
- },
1456
- {
1457
- "type": "block",
1458
- "name": "item",
1459
- "level": 2,
1460
- "content": [
1461
- {
1462
- "type": "para",
1463
- "content": [
1464
- {
1465
- "type": "fcode",
1466
- "name": "C",
1467
- "content": [
1468
- "args.inferPrivate"
1469
- ]
1470
- },
1471
- " ",
1472
- {
1473
- "type": "fcode",
1474
- "name": "B",
1475
- "content": [
1476
- {
1477
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1478
- "type": "fcode",
1479
- "name": "L",
1480
- "content": [
1481
- "string"
1482
- ]
1483
- },
1484
- "?"
1485
- ]
1486
- },
1487
- " a valid regular expression string\nto infer whether a code element should be private, given its naming structure.\nFor instance, you can specify ",
1488
- {
1489
- "type": "fcode",
1490
- "name": "C",
1491
- "content": [
1492
- "inferPrivate: '^_'"
1493
- ]
1494
- },
1495
- " to automatically treat\nmethods named like ",
1496
- {
1497
- "type": "fcode",
1498
- "name": "C",
1499
- "content": [
1500
- "_myMethod"
1501
- ]
1502
- },
1503
- " as private."
1504
- ]
1505
- }
1506
- ]
1507
- },
1508
- {
1509
- "type": "block",
1510
- "name": "item",
1511
- "level": 2,
1512
- "content": [
1513
- {
1514
- "type": "para",
1515
- "content": [
1516
- {
1517
- "type": "fcode",
1518
- "name": "C",
1519
- "content": [
1520
- "args.extension"
1521
- ]
1522
- },
1523
- " ",
1524
- {
1525
- "type": "fcode",
1526
- "name": "B",
1527
- "content": [
1528
- "(",
1529
- {
1530
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1531
- "type": "fcode",
1532
- "name": "L",
1533
- "content": [
1534
- "string"
1535
- ]
1536
- },
1537
- " ",
1538
- "|",
1539
- " ",
1540
- {
1541
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1542
- "type": "fcode",
1543
- "name": "L",
1544
- "content": [
1545
- "Array"
1546
- ]
1547
- },
1548
- "<",
1549
- {
1550
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1551
- "type": "fcode",
1552
- "name": "L",
1553
- "content": [
1554
- "string"
1555
- ]
1556
- },
1557
- ">)?"
1558
- ]
1559
- },
1560
- " treat additional file extensions\nas JavaScript, extending the default set of ",
1561
- {
1562
- "type": "fcode",
1563
- "name": "C",
1564
- "content": [
1565
- "js"
1566
- ]
1567
- },
1568
- ", ",
1569
- {
1570
- "type": "fcode",
1571
- "name": "C",
1572
- "content": [
1573
- "es6"
1574
- ]
1575
- },
1576
- ", and ",
1577
- {
1578
- "type": "fcode",
1579
- "name": "C",
1580
- "content": [
1581
- "jsx"
1582
- ]
1583
- },
1584
- "."
1585
- ]
1586
- }
1587
- ]
1588
- }
1589
- ]
1590
- }
1591
- ]
1592
- }
1593
- ]
1594
- },
1595
- {
1596
- "type": "block",
1597
- "level": 3,
1598
- "name": "head",
1599
- "content": [
1600
- "Examples"
1601
- ]
1602
- },
1603
- {
1604
- "type": "block",
1605
- "name": "code",
1606
- "config": {
1607
- "name": "lang",
1608
- "value": "lang"
1609
- },
1610
- "content": [
1611
- {
1612
- "type": "verbatim",
1613
- "value": "var documentation = require('documentation');\n\ndocumentation.build(['index.js'], {\n // only output comments with an explicit @public tag\n access: ['public']\n}).then(res => {\n // res is an array of parsed comments with inferred properties\n // and more: everything you need to build documentation or\n // any other kind of code data.\n});"
1614
- }
1615
- ]
1616
- },
1617
- {
1618
- "type": "para",
1619
- "content": [
1620
- "Returns ",
1621
- {
1622
- "type": "fcode",
1623
- "name": "B",
1624
- "content": [
1625
- {
1626
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
1627
- "type": "fcode",
1628
- "name": "L",
1629
- "content": [
1630
- "Promise"
1631
- ]
1632
- }
1633
- ]
1634
- },
1635
- " results"
1636
- ]
1637
- },
1638
- {
1639
- "type": "block",
1640
- "level": 2,
1641
- "name": "head",
1642
- "content": [
1643
- "formats"
1644
- ]
1645
- },
1646
- {
1647
- "type": "para",
1648
- "content": [
1649
- "Documentation's formats are modular methods that take comments\nand config as input and return Promises with results,\nlike stringified JSON, markdown strings, or Vinyl objects for HTML\noutput."
1650
- ]
1651
- },
1652
- {
1653
- "type": "block",
1654
- "level": 2,
1655
- "name": "head",
1656
- "content": [
1657
- "formats.html"
1658
- ]
1659
- },
1660
- {
1661
- "type": "para",
1662
- "content": [
1663
- "Formats documentation as HTML."
1664
- ]
1665
- },
1666
- {
1667
- "type": "block",
1668
- "level": 3,
1669
- "name": "head",
1670
- "content": [
1671
- "Parameters"
1672
- ]
1673
- },
1674
- {
1675
- "type": "list",
1676
- "level": 1,
1677
- "list": "itemized",
1678
- "content": [
1679
- {
1680
- "type": "block",
1681
- "name": "item",
1682
- "level": 1,
1683
- "content": [
1684
- {
1685
- "type": "para",
1686
- "content": [
1687
- {
1688
- "type": "fcode",
1689
- "name": "C",
1690
- "content": [
1691
- "comments"
1692
- ]
1693
- },
1694
- " ",
1695
- {
1696
- "type": "fcode",
1697
- "name": "B",
1698
- "content": [
1699
- {
1700
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1701
- "type": "fcode",
1702
- "name": "L",
1703
- "content": [
1704
- "Array"
1705
- ]
1706
- },
1707
- "<",
1708
- {
1709
- "meta": "https://developer.mozilla.org/docs/Web/API/Comment/Comment",
1710
- "type": "fcode",
1711
- "name": "L",
1712
- "content": [
1713
- "Comment"
1714
- ]
1715
- },
1716
- ">"
1717
- ]
1718
- },
1719
- " parsed comments"
1720
- ]
1721
- }
1722
- ]
1723
- },
1724
- {
1725
- "type": "block",
1726
- "name": "item",
1727
- "level": 1,
1728
- "content": [
1729
- {
1730
- "type": "para",
1731
- "content": [
1732
- {
1733
- "type": "fcode",
1734
- "name": "C",
1735
- "content": [
1736
- "config"
1737
- ]
1738
- },
1739
- " ",
1740
- {
1741
- "type": "fcode",
1742
- "name": "B",
1743
- "content": [
1744
- {
1745
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
1746
- "type": "fcode",
1747
- "name": "L",
1748
- "content": [
1749
- "Object"
1750
- ]
1751
- }
1752
- ]
1753
- },
1754
- " Options that can customize the output"
1755
- ]
1756
- },
1757
- {
1758
- "type": "list",
1759
- "level": 2,
1760
- "list": "itemized",
1761
- "content": [
1762
- {
1763
- "type": "block",
1764
- "name": "item",
1765
- "level": 2,
1766
- "content": [
1767
- {
1768
- "type": "para",
1769
- "content": [
1770
- {
1771
- "type": "fcode",
1772
- "name": "C",
1773
- "content": [
1774
- "config.theme"
1775
- ]
1776
- },
1777
- " ",
1778
- {
1779
- "type": "fcode",
1780
- "name": "B",
1781
- "content": [
1782
- {
1783
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
1784
- "type": "fcode",
1785
- "name": "L",
1786
- "content": [
1787
- "string"
1788
- ]
1789
- }
1790
- ]
1791
- },
1792
- " Name of a module used for an HTML theme. (optional, default ",
1793
- {
1794
- "type": "fcode",
1795
- "name": "C",
1796
- "content": [
1797
- "'default_theme'"
1798
- ]
1799
- },
1800
- ")"
1801
- ]
1802
- }
1803
- ]
1804
- }
1805
- ]
1806
- }
1807
- ]
1808
- }
1809
- ]
1810
- },
1811
- {
1812
- "type": "block",
1813
- "level": 3,
1814
- "name": "head",
1815
- "content": [
1816
- "Examples"
1817
- ]
1818
- },
1819
- {
1820
- "type": "block",
1821
- "name": "code",
1822
- "config": {
1823
- "name": "lang",
1824
- "value": "lang"
1825
- },
1826
- "content": [
1827
- {
1828
- "type": "verbatim",
1829
- "value": "var documentation = require('documentation');\nvar streamArray = require('stream-array');\nvar vfs = require('vinyl-fs');\n\ndocumentation.build(['index.js'])\n .then(documentation.formats.html)\n .then(output => {\n streamArray(output).pipe(vfs.dest('./output-directory'));\n });"
1830
- }
1831
- ]
1832
- },
1833
- {
1834
- "type": "para",
1835
- "content": [
1836
- "Returns ",
1837
- {
1838
- "type": "fcode",
1839
- "name": "B",
1840
- "content": [
1841
- {
1842
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
1843
- "type": "fcode",
1844
- "name": "L",
1845
- "content": [
1846
- "Promise"
1847
- ]
1848
- },
1849
- "<",
1850
- {
1851
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1852
- "type": "fcode",
1853
- "name": "L",
1854
- "content": [
1855
- "Array"
1856
- ]
1857
- },
1858
- "<",
1859
- {
1860
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
1861
- "type": "fcode",
1862
- "name": "L",
1863
- "content": [
1864
- "Object"
1865
- ]
1866
- },
1867
- ">>"
1868
- ]
1869
- },
1870
- " Promise with results"
1871
- ]
1872
- },
1873
- {
1874
- "type": "block",
1875
- "level": 2,
1876
- "name": "head",
1877
- "content": [
1878
- "formats.markdown"
1879
- ]
1880
- },
1881
- {
1882
- "type": "para",
1883
- "content": [
1884
- "Formats documentation as\n",
1885
- {
1886
- "meta": "https://daringfireball.net/projects/markdown/",
1887
- "type": "fcode",
1888
- "name": "L",
1889
- "content": [
1890
- "Markdown"
1891
- ]
1892
- },
1893
- "."
1894
- ]
1895
- },
1896
- {
1897
- "type": "block",
1898
- "level": 3,
1899
- "name": "head",
1900
- "content": [
1901
- "Parameters"
1902
- ]
1903
- },
1904
- {
1905
- "type": "list",
1906
- "level": 1,
1907
- "list": "itemized",
1908
- "content": [
1909
- {
1910
- "type": "block",
1911
- "name": "item",
1912
- "level": 1,
1913
- "content": [
1914
- {
1915
- "type": "para",
1916
- "content": [
1917
- {
1918
- "type": "fcode",
1919
- "name": "C",
1920
- "content": [
1921
- "comments"
1922
- ]
1923
- },
1924
- " ",
1925
- {
1926
- "type": "fcode",
1927
- "name": "B",
1928
- "content": [
1929
- {
1930
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
1931
- "type": "fcode",
1932
- "name": "L",
1933
- "content": [
1934
- "Array"
1935
- ]
1936
- },
1937
- "<",
1938
- {
1939
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
1940
- "type": "fcode",
1941
- "name": "L",
1942
- "content": [
1943
- "Object"
1944
- ]
1945
- },
1946
- ">"
1947
- ]
1948
- },
1949
- " parsed comments"
1950
- ]
1951
- }
1952
- ]
1953
- },
1954
- {
1955
- "type": "block",
1956
- "name": "item",
1957
- "level": 1,
1958
- "content": [
1959
- {
1960
- "type": "para",
1961
- "content": [
1962
- {
1963
- "type": "fcode",
1964
- "name": "C",
1965
- "content": [
1966
- "args"
1967
- ]
1968
- },
1969
- " ",
1970
- {
1971
- "type": "fcode",
1972
- "name": "B",
1973
- "content": [
1974
- {
1975
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
1976
- "type": "fcode",
1977
- "name": "L",
1978
- "content": [
1979
- "Object"
1980
- ]
1981
- }
1982
- ]
1983
- },
1984
- " Options that can customize the output"
1985
- ]
1986
- }
1987
- ]
1988
- }
1989
- ]
1990
- },
1991
- {
1992
- "type": "block",
1993
- "level": 3,
1994
- "name": "head",
1995
- "content": [
1996
- "Examples"
1997
- ]
1998
- },
1999
- {
2000
- "type": "block",
2001
- "name": "code",
2002
- "config": {
2003
- "name": "lang",
2004
- "value": "lang"
2005
- },
2006
- "content": [
2007
- {
2008
- "type": "verbatim",
2009
- "value": "var documentation = require('documentation');\nvar fs = require('fs');\n\ndocumentation.build(['index.js'])\n .then(documentation.formats.md)\n .then(output => {\n // output is a string of Markdown data\n fs.writeFileSync('./output.md', output);\n });"
2010
- }
2011
- ]
2012
- },
2013
- {
2014
- "type": "para",
2015
- "content": [
2016
- "Returns ",
2017
- {
2018
- "type": "fcode",
2019
- "name": "B",
2020
- "content": [
2021
- {
2022
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
2023
- "type": "fcode",
2024
- "name": "L",
2025
- "content": [
2026
- "Promise"
2027
- ]
2028
- },
2029
- "<",
2030
- {
2031
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
2032
- "type": "fcode",
2033
- "name": "L",
2034
- "content": [
2035
- "string"
2036
- ]
2037
- },
2038
- ">"
2039
- ]
2040
- },
2041
- " a promise of the eventual value"
2042
- ]
2043
- },
2044
- {
2045
- "type": "block",
2046
- "level": 2,
2047
- "name": "head",
2048
- "content": [
2049
- "formats.json"
2050
- ]
2051
- },
2052
- {
2053
- "type": "para",
2054
- "content": [
2055
- "Formats documentation as a JSON string."
2056
- ]
2057
- },
2058
- {
2059
- "type": "block",
2060
- "level": 3,
2061
- "name": "head",
2062
- "content": [
2063
- "Parameters"
2064
- ]
2065
- },
2066
- {
2067
- "type": "list",
2068
- "level": 1,
2069
- "list": "itemized",
2070
- "content": [
2071
- {
2072
- "type": "block",
2073
- "name": "item",
2074
- "level": 1,
2075
- "content": [
2076
- {
2077
- "type": "para",
2078
- "content": [
2079
- {
2080
- "type": "fcode",
2081
- "name": "C",
2082
- "content": [
2083
- "comments"
2084
- ]
2085
- },
2086
- " ",
2087
- {
2088
- "type": "fcode",
2089
- "name": "B",
2090
- "content": [
2091
- {
2092
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
2093
- "type": "fcode",
2094
- "name": "L",
2095
- "content": [
2096
- "Array"
2097
- ]
2098
- },
2099
- "<",
2100
- {
2101
- "meta": "https://developer.mozilla.org/docs/Web/API/Comment/Comment",
2102
- "type": "fcode",
2103
- "name": "L",
2104
- "content": [
2105
- "Comment"
2106
- ]
2107
- },
2108
- ">"
2109
- ]
2110
- },
2111
- " parsed comments"
2112
- ]
2113
- }
2114
- ]
2115
- }
2116
- ]
2117
- },
2118
- {
2119
- "type": "block",
2120
- "level": 3,
2121
- "name": "head",
2122
- "content": [
2123
- "Examples"
2124
- ]
2125
- },
2126
- {
2127
- "type": "block",
2128
- "name": "code",
2129
- "config": {
2130
- "name": "lang",
2131
- "value": "lang"
2132
- },
2133
- "content": [
2134
- {
2135
- "type": "verbatim",
2136
- "value": "var documentation = require('documentation');\nvar fs = require('fs');\n\ndocumentation.build(['index.js'])\n .then(documentation.formats.json)\n .then(output => {\n // output is a string of JSON data\n fs.writeFileSync('./output.json', output);\n });"
2137
- }
2138
- ]
2139
- },
2140
- {
2141
- "type": "para",
2142
- "content": [
2143
- "Returns ",
2144
- {
2145
- "type": "fcode",
2146
- "name": "B",
2147
- "content": [
2148
- {
2149
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
2150
- "type": "fcode",
2151
- "name": "L",
2152
- "content": [
2153
- "Promise"
2154
- ]
2155
- },
2156
- "<",
2157
- {
2158
- "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
2159
- "type": "fcode",
2160
- "name": "L",
2161
- "content": [
2162
- "string"
2163
- ]
2164
- },
2165
- ">"
2166
- ]
2167
- },
2168
- " "
2169
- ]
2170
- }
2171
- ]
2172
- }