forked from documentationjs/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared_options.js
132 lines (131 loc) · 3.58 KB
/
shared_options.js
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
/**
* Adds shared options to any command that runs documentation
*/
export const sharedInputOptions = {
babel: {
describe:
'path to babelrc or babel.options.js to override default babel config',
type: 'string',
default: null
},
shallow: {
describe:
'shallow mode turns off dependency resolution, ' +
'only processing the specified files (or the main script specified in package.json)',
default: false,
type: 'boolean'
},
config: {
describe: 'configuration file. an array defining explicit sort order',
alias: 'c',
type: 'string'
},
'no-package': {
describe:
'dont find and use package.json for project- configuration option defaults',
alias: 'np',
type: 'boolean',
default: false
},
external: {
describe:
'a string / glob match pattern that defines which external ' +
'modules will be whitelisted and included in the generated documentation.',
default: null
},
'require-extension': {
describe:
"additional extensions to include in require() and import's search algorithm." +
'For instance, adding .es5 would allow require("adder") to find "adder.es5"',
type: 'array',
alias: 're'
},
'parse-extension': {
describe: 'additional extensions to parse as source code.',
type: 'array',
alias: 'pe'
},
access: {
describe:
'Include only comments with a given access level, out of private, ' +
'protected, public, undefined. By default, public, protected, and undefined access ' +
'levels are included',
choices: ['public', 'private', 'protected', 'undefined'],
array: true,
alias: 'a'
},
github: {
type: 'boolean',
describe: 'infer links to github in documentation',
alias: 'g'
},
'infer-private': {
type: 'string',
describe:
'Infer private access based on the name. This is a regular expression that ' +
'is used to match the name'
},
'document-exported': {
type: 'boolean',
describe:
'Generate documentation for all exported bindings and members ' +
'even if there is no JSDoc for them',
default: false
},
'sort-order': {
describe: 'The order to sort the documentation',
array: true,
choices: ['source', 'alpha', 'kind', 'access', 'memberof'],
default: ['source']
},
resolve: {
describe: 'Dependency resolution algorithm.',
choices: ['browser', 'node'],
default: 'browser'
}
};
/**
* Adds shared options to any command that runs documentation
*/
export const sharedOutputOptions = {
theme: {
describe: 'specify a theme: this must be a valid theme module',
alias: 't'
},
'project-name': {
describe: 'project name. by default, inferred from package.json'
},
'project-version': {
describe: 'project version. by default, inferred from package.json'
},
'project-description': {
describe: 'project description. by default, inferred from package.json'
},
'project-homepage': {
describe: 'project homepage. by default, inferred from package.json'
},
favicon: {
describe: 'favicon used in html'
},
format: {
alias: 'f',
default: 'json',
choices: ['json', 'md', 'remark', 'html']
},
watch: {
describe: 'watch input files and rebuild documentation when they change',
alias: 'w',
type: 'boolean'
},
'markdown-toc': {
describe: 'include a table of contents in markdown output',
default: true,
type: 'boolean'
},
'markdown-toc-max-depth': {
describe:
'specifies the max depth of the table of contents in markdown output',
default: 6,
type: 'number'
}
};