Skip to content
Open
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
10 changes: 5 additions & 5 deletions packages/igniteui-mcp/igniteui-doc-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ Add to `.vscode/mcp.json`:
"igniteui": {
"command": "npx",
"args": ["-y", "igniteui-cli@next", "mcp"]
},
}
}
}
```

### Claude Desktop
If IgniteUi ClI is globbaly installed you can configure the MCP like this:
If IgniteUI CLI is globally installed you can configure the MCP like this:

Add to `claude_desktop_config.json`:

Expand All @@ -70,12 +70,12 @@ Add to `claude_desktop_config.json`:
"igniteui": {
"command": "npx",
"args": ["-y", "igniteui-cli@next", "mcp"]
},
}
}
}
```
### Cursor
If IgniteUi ClI is globbaly installed you can configure the MCP like this:
If IgniteUI CLI is globally installed you can configure the MCP like this:

Add to Cursor MCP settings:

Expand All @@ -85,7 +85,7 @@ Add to Cursor MCP settings:
"igniteui": {
"command": "npx",
"args": ["-y", "igniteui-cli@next", "mcp"]
},
}
}
}
```
Expand Down
4 changes: 4 additions & 0 deletions packages/igniteui-mcp/igniteui-doc-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"scripts": {
"build": "tsc && npx tsx scripts/build.ts",
"start": "node dist/index.js",
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"build:db": "npx tsx scripts/build-db.ts",
"inspector": "npx @modelcontextprotocol/inspector dist/index.js",
"clear": "npx tsx -e \"import{rmSync}from'fs';rmSync('dist',{recursive:true,force:true})\"",
Expand Down Expand Up @@ -104,6 +107,7 @@
"openai": "^6.22.0",
"tsx": "^4.21.0",
"typedoc": "^0.28.6",
"vitest": "^3.0.0",
"typedoc-plugin-markdown": "^4.4.1",
"typescript": "^5.8.3"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import { describe, expect, it } from 'vitest';
import { PLATFORMS, PLATFORM_CONFIGS, getPlatforms, getPlatformConfig } from '../../config/platforms.js';
import type { Platform, PlatformConfig } from '../../config/platforms.js';

describe('PLATFORMS', () => {
it('includes angular, react, and webcomponents', () => {
expect(PLATFORMS).toContain('angular');
expect(PLATFORMS).toContain('react');
expect(PLATFORMS).toContain('webcomponents');
});

it('has exactly 3 entries', () => {
expect(PLATFORMS).toHaveLength(3);
});
});

describe('PLATFORM_CONFIGS', () => {
it('has a config for every platform', () => {
for (const platform of PLATFORMS) {
expect(PLATFORM_CONFIGS[platform]).toBeDefined();
expect(PLATFORM_CONFIGS[platform].key).toBe(platform);
}
});

it('angular uses markdown-index api source', () => {
expect(PLATFORM_CONFIGS.angular.apiSource.kind).toBe('markdown-index');
});

it('react uses typedoc-json api source with a jsonPath', () => {
const source = PLATFORM_CONFIGS.react.apiSource;
expect(source.kind).toBe('typedoc-json');
if (source.kind === 'typedoc-json') {
expect(source.jsonPath).toBeDefined();
expect(source.jsonPath).toContain('.json');
}
});

it('webcomponents uses markdown-index api source', () => {
expect(PLATFORM_CONFIGS.webcomponents.apiSource.kind).toBe('markdown-index');
});

it('each config has required fields', () => {
for (const platform of PLATFORMS) {
const config = PLATFORM_CONFIGS[platform];
expect(config.displayName).toBeTruthy();
expect(config.submodulePath).toBeTruthy();
expect(config.docsPath).toBeTruthy();
}
});
});

describe('getPlatforms()', () => {
it('returns an array of PlatformConfig objects', () => {
const platforms = getPlatforms();
expect(platforms).toBeInstanceOf(Array);
expect(platforms.length).toBeGreaterThan(0);
});

it('returns one config per platform', () => {
const platforms = getPlatforms();
expect(platforms).toHaveLength(PLATFORMS.length);
});

it('each returned config has a key matching a PLATFORMS entry', () => {
const keys = getPlatforms().map(p => p.key);
for (const platform of PLATFORMS) {
expect(keys).toContain(platform);
}
});
});

describe('getPlatformConfig()', () => {
it('returns the correct config for angular', () => {
const config = getPlatformConfig('angular');
expect(config.key).toBe('angular');
expect(config.displayName).toBe('Angular');
});

it('returns the correct config for react', () => {
const config = getPlatformConfig('react');
expect(config.key).toBe('react');
expect(config.displayName).toBe('React');
});

it('returns the correct config for webcomponents', () => {
const config = getPlatformConfig('webcomponents');
expect(config.key).toBe('webcomponents');
expect(config.displayName).toBe('Web Components');
});
});
Loading