-
Notifications
You must be signed in to change notification settings - Fork 5
/
typedoc.js
27 lines (24 loc) · 886 Bytes
/
typedoc.js
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
const { readdirSync, existsSync } = require("fs");
const constructsDir = "src/constructs";
const experimentalDir = "src/experimental";
const utilsDir = "src/utils";
function getEntryPointsFromSubdirectories(directory) {
return readdirSync(directory, { withFileTypes: true })
.filter((dir) => dir.isDirectory())
.map(({ name }) => `${directory}/${name}/index.ts`)
.filter((file) => existsSync(file));
}
module.exports = {
exclude: "src/**/*.test.ts",
entryPoints: [
"src/patterns/index.ts",
"src/constants/index.ts",
"src/types/index.ts",
// we purposefully do not have an index.ts in `src/constructs`, `src/experimental` or `src/utils`
...getEntryPointsFromSubdirectories(constructsDir),
...getEntryPointsFromSubdirectories(experimentalDir),
...getEntryPointsFromSubdirectories(utilsDir),
],
out: "target",
readme: "README.md",
};