-
Notifications
You must be signed in to change notification settings - Fork 16
/
documentation.js.node.txt
139 lines (99 loc) · 7.95 KB
/
documentation.js.node.txt
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
DOCUMENTATION.JS
ALTERNATIVES ==> #See JSDoc
VERSION ==> #14.0.3
/=+===============================+=\
/ : : \
)==: TAGS :==(
\ :_______________________________: /
\=+===============================+=/
TAGS ==> #Use JSDoc tags
TYPE #Any JSDoc TYPE
#TypeScript TYPEs not supported (but referring to them by name works)
# - including in @param|returns type inference
#Flow TYPEs might be supported
INFERENCE ==> #Many tags are automatically guessed from JavaScript:
# - @type
# - @default (ARG = VAL)
# - @file
# - @namespace|member|property
# - @function|param
# - @class
#Also inferred from TypeScript/Flow:
# - @param|returns
#Only VARs with JSDoc comment blocks are documented
# - also exported ones if --document-exported
/=+===============================+=\
/ : : \
)==: CONFIG :==(
\ :_______________________________: /
\=+===============================+=/
-c|--config CONF_FILE #No defaults. Usually called 'documentation.yml'
#CONF.* are camelCase
--babel FILE #Babel CONF (def: hard-coded one) used for @babel/parser
/=+===============================+=\
/ : : \
)==: CLI :==(
\ :_______________________________: /
\=+===============================+=/
documentation build FILE... #Create documentation output
-o|--output 'FILE|DIR|stdout' #Def: 'stdout'
documentation readme FILE... #Inject documentation into README
#Shares same options as documentation build, except following ones.
--readme-file 'FILE' #Def: 'README.md'
-s|--section STR #Heading (required).
-d|--diff-only #BOOL (def: false). Only exit code 0 or 1 depending on whether README changed
-q|--quiet #BOOL (def: false)
documentation lint FILE... #Lint documentation tags.
#Only uses --shallow options of documentation build
-w|--watch #BOOL (def: false)
/=+===============================+=\
/ : : \
)==: PROGRAMMATIC :==(
\ :_______________________________: /
\=+===============================+=/
DOCUMENTATION.*(...) #Programmatic. Document it only if needed.
/=+===============================+=\
/ : : \
)==: SELECTION :==(
\ :_______________________________: /
\=+===============================+=/
--pe|--parse-extension 'EXT' #Include files with those extensions as well during parsing
#Def: ['.[m]js|ts[x]', '.es6']
--re|--require-extension 'EXT' #Include files with those extensions as well during --shallow
#Def: ['.[m]js|ts[x]', '.es6']
--document-exported #BOOL (def: false). Generate documentation to all exported VARs even with no comment blocks.
-a|--access STR #STR_ARR. Include tags with @access public|protected|private|undefined
--infer-private REGEXP #Make VAR whose name matches REGEXP @private
--resolve #Import resolution among 'browser' (def) or 'node'
--shallow #If false (def), include imported files on top of input FILE...
/=+===============================+=\
/ : : \
)==: OUTPUT :==(
\ :_______________________________: /
\=+===============================+=/
-f|--format STR #Among: 'json' (def), 'md', 'remark' (Markdown AST), 'html'
-g|--github #BOOL. Infer GitHub links to source code
--favicon FILE #In HTML
-t|--theme 'MODULE' #Custom HTML theme. MODULE must export FUNC(OBJ_ARR, OPTS, FUNC(ERROR, VINYL))
--np|--no-package #If false (def), use package.json
#Only for HTML output
--project-name STR #Def: PACKAGE.name
--project-version STR #Def: PACKAGE.version
--project-description STR #Def: PACKAGE.description
--project-homepage STR #Def: PACKAGE.homepage
--markdown-toc #BOOL (def: true). Include ToC in Markdown
--markdown-toc-max-depth #NUM (def: 6)
--sort-order STR #How variables are sorted: 'source' (def) (source order) or 'alpha' (alphabetically)
CONF.toc #Allow:
# - sorting
# - including|excluding VARs
# - custom sections (non-VARs)
#ARR of:
# - OBJ:
# - name 'NAME': either 'VAR' name or heading name (for custom section)
# - children 'NAME'_ARR
# - description STR
# - file 'PATH.md': like description but in file
# - 'NAME'