Repository navigation
Expand file tree
/
Copy pathtypedoc.js
More file actions
81 lines (73 loc) · 2.34 KB
/
Copy pathtypedoc.js
File metadata and controls
81 lines (73 loc) · 2.34 KB
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
const {
CATEGORY_ORDER,
DEFAULT_CATEGORY
} = require('./scripts/typedoc-plugin.js');
module.exports = {
// Document what the package actually exports. Pointing TypeDoc at `src/`
// instead made it expand every file in the tree, which pulled internal
// modules (the reducer, auth state, utils) into the reference.
entryPoints: ['./src/index.tsx'],
entryPointStrategy: 'resolve',
out: './docs/',
readme: './README.md',
name: 'Auth0 React SDK',
cleanOutputDir: true,
plugin: ['./scripts/typedoc-plugin.js'],
theme: 'auth0',
// Keep the reference to the public surface.
excludePrivate: true,
excludeProtected: true,
excludeInternal: true,
// Without this, every error class inherits Error's `stack`, `captureStackTrace`
// and `prepareStackTrace` from TypeScript's own lib types, and React's own
// types leak in through the component props. Almost the entire type surface is
// re-exported from `@auth0/auth0-spa-js` and is part of our public API, so
// only the TypeScript lib, React and other third-party packages are external.
excludeExternals: true,
externalPattern: [
'**/node_modules/typescript/**',
'**/node_modules/@types/**',
'**/node_modules/react/**',
'**/node_modules/react-dom/**'
],
// Note: no blanket `node_modules` exclusion here. `exclude` is matched against
// a symbol's declaration file, so excluding node_modules would also drop the
// options, errors and sub-clients we deliberately re-export from
// `@auth0/auth0-spa-js`.
exclude: [
'**/__tests__/**/*',
'**/__mocks__/**/*',
'**/cypress/**/*',
'./src/utils.tsx',
'./src/reducer.tsx'
],
// Group the landing page and sidebar by category rather than by TypeScript
// kind, so readers see "Getting Started" before a wall of interfaces.
categorizeByGroup: false,
categoryOrder: CATEGORY_ORDER,
defaultCategory: DEFAULT_CATEGORY,
navigation: {
includeCategories: true,
includeGroups: false
},
sort: ['kind', 'alphabetical'],
kindSortOrder: [
'Function',
'Class',
'Interface',
'TypeAlias',
'Enum',
'Variable'
],
hideGenerator: true,
searchInComments: true,
highlightLanguages: ['typescript', 'javascript', 'jsx', 'tsx', 'bash'],
visibilityFilters: {
protected: false,
inherited: true,
external: true
},
compilerOptions: {
skipLibCheck: true
}
};