forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypedoc.config.mjs
More file actions
45 lines (40 loc) · 1.21 KB
/
Copy pathtypedoc.config.mjs
File metadata and controls
45 lines (40 loc) · 1.21 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
import path from 'node:path';
import fs from 'node:fs';
const IGNORE_LIST = [
'.DS_Store',
'dev-cli',
'expo-passkeys',
'tailwind-css-transformer',
'testing',
'themes',
'ui',
'upgrade',
];
/**
* Return an array of relative paths to all folders in the "packages" folder to be used for the "entryPoints" option.
*/
function getPackages() {
const packagesDir = path.resolve('packages');
const packages = fs.readdirSync(packagesDir);
return packages.filter(dir => !IGNORE_LIST.includes(dir)).map(dir => path.join('packages', dir));
}
/** @type {Partial<import("typedoc").TypeDocOptions>} */
const config = {
out: './.typedoc/docs',
// TODO: Once we're happy with the output the JSON should be written to a non-gitignored location as we want to consume it in other places
json: './.typedoc/output.json',
entryPointStrategy: 'packages',
excludePrivate: true,
blockTags: ['@param', '@returns'],
modifierTags: ['@alpha', '@beta', '@experimental', '@deprecated'],
packageOptions: {
includeVersion: false,
excludePrivate: true,
sortEntryPoints: true,
sort: 'alphabetical',
excludeExternals: true,
gitRevision: 'main',
},
entryPoints: getPackages(),
};
export default config;