-
Notifications
You must be signed in to change notification settings - Fork 304
/
Copy pathtypedoc.config.mjs
49 lines (44 loc) · 1.49 KB
/
typedoc.config.mjs
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
import path from 'node:path';
import fs from 'node:fs';
import { OptionDefaults } from 'typedoc';
const IGNORE_LIST = [
'.DS_Store',
'dev-cli',
'expo-passkeys',
'tailwindcss-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',
plugin: ['typedoc-plugin-missing-exports'],
packageOptions: {
includeVersion: false,
excludePrivate: true,
sortEntryPoints: true,
sort: 'alphabetical',
excludeExternals: true,
excludeInternal: true,
excludeNotDocumented: true,
gitRevision: 'main',
blockTags: [...OptionDefaults.blockTags, '@warning', '@note', '@important'],
modifierTags: [...OptionDefaults.modifierTags],
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
},
entryPoints: ['packages/nextjs', 'packages/react', 'packages/backend', 'packages/types'], // getPackages(),
};
export default config;