Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ yarn-error.log*
.env.production.local
.temp

# generated search indices (built from TypeDoc output)
public/api-search/
public/*-search-index.json

# vercel
.vercel
public/sitemap.xml
Expand Down
440 changes: 440 additions & 0 deletions components/typedocSearch.component.tsx

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions configuration/typedoc.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/**
* Configuration for TypeDoc API documentation generation.
*
* We shallow-clone the GitHub repo at the published version tag and run
* TypeDoc against the real .ts source files. TypeDoc's native git
* integration then produces correct GitHub links with accurate line numbers.
*/

export interface TypeDocPackageConfig {
/** npm package name — used only to resolve the latest published version */
npmPackage: string;
/** Path to the package directory inside the monorepo (for sparse checkout) */
repoPath: string;
/** Path to the TypeScript entry point inside the monorepo */
entryPoint: string;
}

export interface TypeDocConfig {
/** GitHub repository in "owner/repo" form */
githubRepo: string;
/** Packages to document */
packages: TypeDocPackageConfig[];
/** Version tag to clone. If "latest", resolves via npm registry. */
version: string;
/** Title shown in generated documentation */
title: string;
}

const config: TypeDocConfig = {
githubRepo: "BabylonJS/Babylon.js",
version: "latest",
title: "Babylon.js API documentation",
packages: [
{
npmPackage: "@babylonjs/core",
repoPath: "packages/dev/core",
entryPoint: "packages/dev/core/src/index.ts",
},
{
npmPackage: "@babylonjs/loaders",
repoPath: "packages/dev/loaders",
entryPoint: "packages/dev/loaders/src/index.ts",
},
{
npmPackage: "@babylonjs/serializers",
repoPath: "packages/dev/serializers",
entryPoint: "packages/dev/serializers/src/index.ts",
},
{
npmPackage: "@babylonjs/gui",
repoPath: "packages/dev/gui",
entryPoint: "packages/dev/gui/src/index.ts",
},
{
npmPackage: "@babylonjs/materials",
repoPath: "packages/dev/materials",
entryPoint: "packages/dev/materials/src/index.ts",
},
{
npmPackage: "@babylonjs/inspector",
repoPath: "packages/dev/inspector",
entryPoint: "packages/dev/inspector/src/index.ts",
},
{
npmPackage: "@babylonjs/viewer",
repoPath: "packages/tools/viewer",
entryPoint: "packages/tools/viewer/src/index.ts",
},
],
};

export const viewerConfig: TypeDocConfig = {
githubRepo: "BabylonJS/Babylon.js",
version: "latest",
title: "Babylon.js Viewer",
packages: [
{
npmPackage: "@babylonjs/viewer",
repoPath: "packages/tools/viewer",
entryPoint: "packages/tools/viewer/src/index.ts",
},
],
};

export default config;
Loading