Skip to content

Commit c719288

Browse files
committed
Fix more TypeDoc
1 parent 848be2d commit c719288

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/buildtools/src/build/docs/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export async function buildSingleBundleDocs(bundle: ResolvedBundle, outDir: stri
2323
};
2424
}
2525

26-
await app.generateJson(project, pathlib.join(bundle.directory, 'dist', 'docs.json'));
26+
// TypeDoc expects POSIX paths
27+
const directoryAsPosix = bundle.directory.replace(/\\/g, '/');
28+
await app.generateJson(project, `${directoryAsPosix}/dist/docs.json`);
2729

2830
if (app.logger.hasErrors()) {
2931
return {

lib/buildtools/src/build/docs/typedoc.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export function initTypedocForHtml(bundles: Record<string, ResolvedBundle>, logL
3737
...typedocPackageOptions,
3838
name: 'Source Academy Modules',
3939
logLevel,
40-
entryPoints: Object.values(bundles).map(({ directory }) => pathlib.join(directory, 'dist', 'docs.json')),
40+
entryPoints: Object.values(bundles).map(({ directory }) => {
41+
// TypeDoc expects POSIX paths
42+
const directoryAsPosix = directory.replace(/\\/g, '/');
43+
return `${directoryAsPosix}/dist/docs.json`;
44+
}),
4145
entryPointStrategy: 'merge',
4246
readme: pathlib.join(import.meta.dirname, 'docsreadme.md'),
4347
});

0 commit comments

Comments
 (0)