mirror of
https://github.com/langchain-ai/docs.git
synced 2026-07-22 20:35:34 -04:00
910001ce1a
Adds a new `reference/` path that centralizes the logic for creating reference documentation ## For Python We can leverage the existing reference docs pipeline thats used within the `langchain` repo, and adapting it to include docs from more sources (see https://github.com/langchain-ai/langchain/pull/33066). More details about how this works are in `reference/python/README.md`. ## For TypeScript We'll be keeping the existing [typedoc](https://typedoc.org/) library to render references, but we're onshoring the work of consolidating those into one reference site within this repo. The basic process of how that happens is: * by reading a statically defined list of packages and their locations (defined in reference/javascript/build.ts`) * doing a shallow clone of each unique repo + branch * doing the appropriate install steps so that types can be inferred properly * extracting package entrypoints by reading the `exports` key in `package.json` * pointing typedoc to add those as entrypoints with the [packages strategy](https://typedoc.org/documents/Options.Input.html#packages) * building the typedoc outputs to reference/dist/javascript/ ## New `make` targets - `make build-references` will run scripts to format python + js reference documentation concurrently (which will end up in reference/dist/) - `make preview-references` will run aforementioned build scripts and start a dev server (this won't work until a vercel project is configured) ## Vercel Setup In order for these changes to be reflected on `reference.langchain.com`, a new Vercel project needs to be created (which can happen once this is merged). This was tested against a "test" vercel setup and works as expected, with both reference targets accessible from their respective subpaths
27 lines
743 B
JSON
27 lines
743 B
JSON
{
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "tsx build.ts",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
"format": "prettier . --write",
|
|
"format:check": "prettier . --check"
|
|
},
|
|
"packageManager": "pnpm@10.14.0",
|
|
"devDependencies": {
|
|
"@types/node": "^24.5.2",
|
|
"@eslint/js": "^9.13.0",
|
|
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
|
"@typescript-eslint/parser": "^8.8.1",
|
|
"eslint": "^9.12.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"typescript-eslint": "^8.8.1",
|
|
"prettier": "^3.3.3",
|
|
"tsx": "^4.20.5",
|
|
"typedoc": "^0.28.13",
|
|
"typedoc-github-theme": "^0.3.1",
|
|
"typedoc-plugin-expand-object-like-types": "^0.1.2",
|
|
"nypm": "^0.6.2"
|
|
}
|
|
}
|