Skip to content

Commit 5f75513

Browse files
committed
refactor(mcp): move api-docs submodule from blazor/ to common/
api-docs is shared by all four platforms (Angular, React, Web Components, Blazor) — its previous location under blazor/ was misleading. Move it next to the other cross-platform submodule (common/igniteui-xplat-docs). The new submodule entry tracks master (records branch = master in .gitmodules) and the recorded gitlink is current upstream HEAD, not the previous pin. Existing contributors will need: git submodule deinit packages/igniteui-mcp/igniteui-doc-mcp/blazor/api-docs rm -rf packages/igniteui-mcp/igniteui-doc-mcp/blazor/api-docs git submodule update --init packages/igniteui-mcp/igniteui-doc-mcp/common/api-docs
1 parent 5ab8223 commit 5f75513

15 files changed

Lines changed: 56 additions & 55 deletions

File tree

.gitmodules

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
[submodule "packages/igniteui-mcp/igniteui-doc-mcp/react/igniteui-react"]
3636
path = packages/igniteui-mcp/igniteui-doc-mcp/react/igniteui-react
3737
url = https://github.com/IgniteUI/igniteui-react.git
38-
[submodule "packages/igniteui-mcp/igniteui-doc-mcp/blazor/api-docs"]
39-
path = packages/igniteui-mcp/igniteui-doc-mcp/blazor/api-docs
40-
url = https://github.com/IgniteUI/api-docs
4138
[submodule "packages/igniteui-mcp/igniteui-doc-mcp/blazor/igniteui-blazor"]
4239
path = packages/igniteui-mcp/igniteui-doc-mcp/blazor/igniteui-blazor
4340
url = https://github.com/IgniteUI/igniteui-blazor.git
41+
[submodule "packages/igniteui-mcp/igniteui-doc-mcp/common/api-docs"]
42+
path = packages/igniteui-mcp/igniteui-doc-mcp/common/api-docs
43+
url = https://github.com/IgniteUI/api-docs
44+
branch = master
45+
ignore = dirty

packages/igniteui-mcp/igniteui-doc-mcp/CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ This is the **Ignite UI Documentation MCP Server** — a Model Context Protocol
2929
│ ├── inject-blazor-docs.ts # Inject Blazor sample code (github-src based, .razor/.razor.cs/.css files)
3030
│ ├── compress-blazor-docs.ts # LLM-based compression with Blazor-specific prompt (Igb prefix, no suffix, supports --batch mode)
3131
│ ├── validate-docs.ts # LLM-as-Judge validation of compressed docs (platform-independent)
32-
│ ├── export-angular-api.ts # Build Angular API docs from blazor/api-docs submodule → docs/angular-api/
33-
│ ├── export-react-api.ts # Build React API docs from blazor/api-docs submodule → docs/react-api/
34-
│ ├── export-wc-api.ts # Build Web Components API docs from blazor/api-docs submodule → docs/webcomponents-api/
35-
│ └── export-blazor-api.ts # Build Blazor API docs from blazor/api-docs submodule → docs/blazor-api/
32+
│ ├── export-angular-api.ts # Build Angular API docs from common/api-docs submodule → docs/angular-api/
33+
│ ├── export-react-api.ts # Build React API docs from common/api-docs submodule → docs/react-api/
34+
│ ├── export-wc-api.ts # Build Web Components API docs from common/api-docs submodule → docs/webcomponents-api/
35+
│ └── export-blazor-api.ts # Build Blazor API docs from common/api-docs submodule → docs/blazor-api/
3636
├── docs/
3737
│ ├── knowledgebase.md # Lessons learned and issues for cross-platform reference (32 entries)
3838
│ ├── db.md # SQLite + FTS4 database integration (IMPLEMENTED)
@@ -84,7 +84,7 @@ npm start # run MCP server in local mode (default, uses bundled SQLite
8484

8585
### API Docs Generation
8686

87-
The `blazor/api-docs` submodule provides the Astro build pipeline used by all four platforms. Run these scripts once (or when upstream API data changes) to populate the `docs/*-api/` directories:
87+
The `common/api-docs` submodule provides the Astro build pipeline used by all four platforms. Run these scripts once (or when upstream API data changes) to populate the `docs/*-api/` directories:
8888

8989
```bash
9090
npm run build:docs:angular-api # Angular: Astro build → docs/angular-api/

packages/igniteui-mcp/igniteui-doc-mcp/DEVELOPMENT.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MCP server that serves pre-compressed Ignite UI component documentation via full
66

77
```bash
88
cd packages/igniteui-mcp/igniteui-doc-mcp
9-
git submodule update --init blazor/api-docs
9+
git submodule update --init common/api-docs
1010
npm install
1111
```
1212

@@ -24,7 +24,7 @@ npm run build:db
2424
```
2525

2626
### Building the API markdown
27-
The `blazor/api-docs` submodule provides the Astro-based API build pipeline used by all four platforms. A fresh clone still needs `git submodule update --init blazor/api-docs` to materialize it locally.
27+
The `common/api-docs` submodule provides the Astro-based API build pipeline used by all four platforms. A fresh clone still needs `git submodule update --init common/api-docs` to materialize it locally.
2828

2929
Before using the MCP server from a source checkout, generate the local API markdowns:
3030

@@ -417,7 +417,7 @@ Per-platform clear removes the platform subdirectory from `docs_processing/`, `d
417417

418418
## API Reference Documentation
419419

420-
The MCP server provides API reference lookup via the `get_api_reference` and `search_api` tools. API docs are generated from the `blazor/api-docs` submodule using its Astro build pipeline and stored as `llms-full.txt` files in `docs/{platform}-api/`.
420+
The MCP server provides API reference lookup via the `get_api_reference` and `search_api` tools. API docs are generated from the `common/api-docs` submodule using its Astro build pipeline and stored as `llms-full.txt` files in `docs/{platform}-api/`.
421421

422422
All four platforms use the same source strategy:
423423

@@ -439,20 +439,20 @@ npm run build:docs:all # Build all four platforms
439439
```
440440

441441
Each `build:docs:{platform}-api` script:
442-
1. Initializes the `blazor/api-docs` git submodule
442+
1. Initializes the `common/api-docs` git submodule
443443
2. Runs `npm install` in the submodule
444444
3. Runs the Astro static build for the platform (`npm run build:{platform}:en`)
445445
4. Copies the generated `llms-full.txt` files from `dist/en/api/{platform}/` to `docs/{platform}-api/`
446446

447-
The Blazor script additionally runs `dotnet tool restore` and `npm run fetch:tools:blazor` + the five docfx package build scripts before the Astro step. Angular's TypeDoc JSON data is pre-bundled in `blazor/api-docs/src/data/angular/` so no fetch step is needed.
447+
The Blazor script additionally runs `dotnet tool restore` and `npm run fetch:tools:blazor` + the five docfx package build scripts before the Astro step. Angular's TypeDoc JSON data is pre-bundled in `common/api-docs/src/data/angular/` so no fetch step is needed.
448448

449449
### Rebuilding After Upstream Changes
450450

451-
When a new version of `blazor/api-docs` is available:
451+
When a new version of `common/api-docs` is available:
452452

453453
1. Update the submodule:
454454
```bash
455-
cd blazor/api-docs
455+
cd common/api-docs
456456
git fetch && git checkout <new-branch-or-tag>
457457
cd ../..
458458
```

packages/igniteui-mcp/igniteui-doc-mcp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ npx @igniteui/mcp-server
2020

2121
In order to run the MCP from this repository, git submodules must be initialized first. The repo already includes the submodule entries, but a fresh clone still needs to fetch them locally.
2222

23-
The `blazor/api-docs` submodule is required for local API markdown generation for all four platforms (Angular, React, Web Components, and Blazor).
23+
The `common/api-docs` submodule is required for local API markdown generation for all four platforms (Angular, React, Web Components, and Blazor).
2424

2525
Recommended first-time setup:
2626

2727
```bash
2828
cd packages/igniteui-mcp/igniteui-doc-mcp
29-
git submodule update --init blazor/api-docs
29+
git submodule update --init common/api-docs
3030
npm install
3131
npm run build:docs:all
3232
npm run build
Lines changed: 0 additions & 1 deletion
This file was deleted.
Submodule api-docs added at 170f969

packages/igniteui-mcp/igniteui-doc-mcp/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@
4747
"build:xplat-blazor": "cd common/igniteui-xplat-docs && npm install --silent && npx tsc --skipLibCheck && npx gulp buildOutputBlazor",
4848
"build:xplat-react": "cd common/igniteui-xplat-docs && npm install --silent && npx tsc --skipLibCheck && npx gulp buildOutputReact",
4949
"build:xplat-wc": "cd common/igniteui-xplat-docs && npm install --silent && npx tsc --skipLibCheck && npx gulp buildOutputWC",
50-
"build:docs:angular-api": "git submodule update --init blazor/api-docs && npx tsx scripts/export-angular-api.ts",
51-
"build:docs:webcomponents": "git submodule update --init webcomponents/igniteui-webcomponents && npm run build && node scripts/build-docs.mjs webcomponents",
52-
"build:docs:blazor-api": "git submodule update --init blazor/api-docs && npx tsx scripts/export-blazor-api.ts",
53-
"build:docs:wc-api": "git submodule update --init blazor/api-docs && npx tsx scripts/export-wc-api.ts",
54-
"build:docs:react-api": "git submodule update --init blazor/api-docs && npx tsx scripts/export-react-api.ts",
55-
"build:docs:all": "git submodule update --init blazor/api-docs && npx tsx scripts/patch-api-docs-overrides.ts && npm run build:docs:angular-api && npm run build:docs:wc-api && npm run build:docs:react-api && npm run build:docs:blazor-api",
50+
"build:docs:angular-api": "git submodule update --init common/api-docs && npx tsx scripts/export-angular-api.ts",
51+
"build:docs:blazor-api": "git submodule update --init common/api-docs && npx tsx scripts/export-blazor-api.ts",
52+
"build:docs:wc-api": "git submodule update --init common/api-docs && npx tsx scripts/export-wc-api.ts",
53+
"build:docs:react-api": "git submodule update --init common/api-docs && npx tsx scripts/export-react-api.ts",
54+
"build:docs:all": "git submodule update --init common/api-docs && npm run build:docs:angular-api && npm run build:docs:wc-api && npm run build:docs:react-api && npm run build:docs:blazor-api",
5655
"export:angular": "npx tsx scripts/export-angular-docs.ts",
5756
"export:react": "npx tsx scripts/export-react-docs.ts --skip-build",
5857
"export:blazor": "npx tsx scripts/export-blazor-docs.ts --skip-build",

packages/igniteui-mcp/igniteui-doc-mcp/scripts/export-angular-api.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
22
* export-angular-api.ts
33
*
4-
* Builds the Angular API docs from the blazor/api-docs submodule and exports
4+
* Builds the Angular API docs from the common/api-docs submodule and exports
55
* the generated llms-full.txt files into:
66
* docs/angular-api/{package}/{version}/llms-full.txt
77
*
88
* Steps (handled here):
9-
* 1. Verify blazor/api-docs submodule is present
10-
* 2. npm install inside blazor/api-docs
9+
* 1. Verify common/api-docs submodule is present
10+
* 2. npm install inside common/api-docs
1111
* 3. (skipped) fetch:tools:angular — Angular TypeDoc JSONs are pre-bundled
12-
* in blazor/api-docs/src/data/angular/ so no download is needed.
12+
* in common/api-docs/src/data/angular/ so no download is needed.
1313
* 4. npm run build:angular:en — Astro SSG → dist/en/api/angular/**
1414
* 5. Copy dist/en/api/angular/{pkg}/{ver}/llms-full.txt
1515
* → docs/angular-api/{pkg}/{ver}/llms-full.txt
@@ -28,7 +28,7 @@ import { execSync } from 'child_process';
2828
import { pickLatestVersionDir } from '../src/lib/version-picker.js';
2929

3030
const ROOT = resolve(import.meta.dirname, '..');
31-
const SUBMODULE_DIR = join(ROOT, 'blazor', 'api-docs');
31+
const SUBMODULE_DIR = join(ROOT, 'common', 'api-docs');
3232
const ASTRO_DIST = join(SUBMODULE_DIR, 'dist', 'en', 'api', 'angular');
3333
const OUTPUT_DIR = join(ROOT, 'docs', 'angular-api');
3434

@@ -41,7 +41,7 @@ function run(cmd: string, cwd: string): void {
4141
if (!existsSync(SUBMODULE_DIR)) {
4242
console.error(
4343
`❌ Submodule not found: ${SUBMODULE_DIR}\n` +
44-
` Run: git submodule update --init blazor/api-docs`
44+
` Run: git submodule update --init common/api-docs`
4545
);
4646
process.exit(1);
4747
}
@@ -51,7 +51,7 @@ console.log('📦 Installing api-docs dependencies...');
5151
run('npm install --silent', SUBMODULE_DIR);
5252

5353
// ── Step 3: (skipped) fetch Angular tools ──────────────────────────────
54-
// Angular TypeDoc JSONs are pre-bundled in blazor/api-docs/src/data/angular/.
54+
// Angular TypeDoc JSONs are pre-bundled in common/api-docs/src/data/angular/.
5555
// run('npm run fetch:tools:angular', SUBMODULE_DIR);
5656

5757
// ── Step 4: Astro static build → dist/en/api/angular/** ──────────────────

packages/igniteui-mcp/igniteui-doc-mcp/scripts/export-blazor-api.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* generated llms-full.txt files into docs/blazor-api/{package}/{version}/llms-full.txt.
66
*
77
* Prerequisites (handled here):
8-
* 1. Verify blazor/api-docs submodule is present
9-
* 2. npm install inside blazor/api-docs
10-
* 3. dotnet tool restore inside blazor/api-docs
8+
* 1. Verify common/api-docs submodule is present
9+
* 2. npm install inside common/api-docs
10+
* 3. dotnet tool restore inside common/api-docs
1111
* 4. npm run fetch:tools:blazor — downloads NuGet DLLs
1212
* 5. npm run build:IgniteUI.Blazor (×5 packages) — docfx → JSON
1313
* 6. npm run build:blazor:en — Astro SSG → dist/en/api/blazor/**
@@ -27,7 +27,7 @@ import { execSync } from 'child_process';
2727
import { pickLatestVersionDir } from '../src/lib/version-picker.js';
2828

2929
const ROOT = resolve(import.meta.dirname, '..');
30-
const SUBMODULE_DIR = join(ROOT, 'blazor', 'api-docs');
30+
const SUBMODULE_DIR = join(ROOT, 'common', 'api-docs');
3131
const ASTRO_DIST = join(SUBMODULE_DIR, 'dist', 'en', 'api', 'blazor');
3232
const OUTPUT_DIR = join(ROOT, 'docs', 'blazor-api');
3333

@@ -49,7 +49,7 @@ function run(cmd: string, cwd: string): void {
4949
if (!existsSync(SUBMODULE_DIR)) {
5050
console.error(
5151
`❌ Submodule not found: ${SUBMODULE_DIR}\n` +
52-
` Run: git submodule update --init blazor/api-docs`
52+
` Run: git submodule update --init common/api-docs`
5353
);
5454
process.exit(1);
5555
}

packages/igniteui-mcp/igniteui-doc-mcp/scripts/export-react-api.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
22
* export-react-api.ts
33
*
4-
* Builds the React API docs from the blazor/api-docs submodule and exports
4+
* Builds the React API docs from the common/api-docs submodule and exports
55
* the generated llms-full.txt files into:
66
* docs/react-api/{package}/{version}/llms-full.txt
77
*
88
* Steps (handled here):
9-
* 1. Verify blazor/api-docs submodule is present
10-
* 2. npm install inside blazor/api-docs
9+
* 1. Verify common/api-docs submodule is present
10+
* 2. npm install inside common/api-docs
1111
* 3. (skipped) fetch:tools:react — tool data download not currently working
1212
* 4. npm run build:react:en — Astro SSG → dist/en/api/react/**
1313
* 5. Copy dist/en/api/react/{pkg}/{ver}/llms-full.txt
@@ -27,7 +27,7 @@ import { execSync } from 'child_process';
2727
import { pickLatestVersionDir } from '../src/lib/version-picker.js';
2828

2929
const ROOT = resolve(import.meta.dirname, '..');
30-
const SUBMODULE_DIR = join(ROOT, 'blazor', 'api-docs');
30+
const SUBMODULE_DIR = join(ROOT, 'common', 'api-docs');
3131
const ASTRO_DIST = join(SUBMODULE_DIR, 'dist', 'en', 'api', 'react');
3232
const OUTPUT_DIR = join(ROOT, 'docs', 'react-api');
3333

@@ -40,7 +40,7 @@ function run(cmd: string, cwd: string): void {
4040
if (!existsSync(SUBMODULE_DIR)) {
4141
console.error(
4242
`❌ Submodule not found: ${SUBMODULE_DIR}\n` +
43-
` Run: git submodule update --init blazor/api-docs`
43+
` Run: git submodule update --init common/api-docs`
4444
);
4545
process.exit(1);
4646
}

0 commit comments

Comments
 (0)