forked from modelcontextprotocol/typescript-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypedoc.config.mjs
More file actions
55 lines (51 loc) · 1.66 KB
/
typedoc.config.mjs
File metadata and controls
55 lines (51 loc) · 1.66 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
import { OptionDefaults } from 'typedoc';
import fg from 'fast-glob';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
// Find all package.json files under packages/ and build package list
const packageJsonPaths = await fg('packages/**/package.json', {
cwd: process.cwd(),
ignore: ['**/node_modules/**']
});
const packages = packageJsonPaths.map(p => {
const rootDir = join(process.cwd(), p.replace('/package.json', ''));
const manifest = JSON.parse(readFileSync(join(process.cwd(), p), 'utf8'));
return { rootDir, manifest };
});
const publicPackages = packages.filter(p => p.manifest.private !== true);
const entryPoints = publicPackages.map(p => p.rootDir);
console.log(
'Typedoc selected public packages:',
publicPackages.map(p => p.manifest.name)
);
/** @type {Partial<import("typedoc").TypeDocOptions>} */
export default {
name: 'MCP TypeScript SDK (V2)',
entryPointStrategy: 'packages',
entryPoints,
packageOptions: {
blockTags: [...OptionDefaults.blockTags, '@format'],
exclude: ['**/*.examples.ts']
},
highlightLanguages: [...OptionDefaults.highlightLanguages, 'powershell'],
projectDocuments: [
'docs/documents.md',
'packages/middleware/README.md',
'examples/server/README.md',
'examples/client/README.md',
],
hostedBaseUrl: 'https://ts.sdk.modelcontextprotocol.io/v2/',
navigationLinks: {
'V1 Docs': '/'
},
navigation: {
compactFolders: true,
includeFolders: false
},
headings: {
readme: false
},
customJs: 'docs/v2-banner.js',
treatWarningsAsErrors: true,
out: 'tmp/docs/',
};