Skip to content

Commit d954fd7

Browse files
authored
chore: clean up entry points for TypeDoc (#11877)
* chore: clean up entry points for TypeDoc * chore: exclude lib
1 parent 3744f56 commit d954fd7

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

docs/typedoc.config.cjs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,22 @@
33
const fs = require("node:fs")
44
const path = require("node:path")
55

6-
const frameworks = fs
6+
const isSkipAdapters = process.env.TYPEDOC_SKIP_ADAPTERS ? "skip" : "adapter-"
7+
const excludePackages = new RegExp(
8+
`(core|next-auth|frameworks-(?!template)|${isSkipAdapters})`
9+
)
10+
11+
const entryPoints = fs
712
.readdirSync(path.resolve(__dirname, "../packages"))
8-
.filter((dir) => dir.startsWith("frameworks-"))
9-
.filter((dir) => dir !== "frameworks-template")
13+
.filter((dir) => excludePackages.test(dir))
1014
.map((dir) => `../packages/${dir}`)
1115

12-
frameworks.push("../packages/next-auth", "../packages/core")
13-
14-
const adapters = process.env.TYPEDOC_SKIP_ADAPTERS
15-
? []
16-
: fs
17-
.readdirSync(path.resolve(__dirname, "../packages"))
18-
.filter((dir) => dir.startsWith("adapter-"))
19-
.map((dir) => `../packages/${dir}`)
20-
2116
/**
2217
* @type {import('typedoc').TypeDocOptions & import('typedoc-plugin-markdown').PluginOptions}
2318
*/
2419
module.exports = {
2520
// typedoc options
26-
entryPoints: [...frameworks, ...adapters],
21+
entryPoints,
2722
entryPointStrategy: "packages",
2823
out: "pages/reference",
2924
tsconfig: "./tsconfig.json",

0 commit comments

Comments
 (0)