diff --git a/README.md b/README.md index aa5cea7..bd2eeb2 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,14 @@ Add to the MCP servers config (`claude_desktop_config.json`, `.cursor/mcp.json`, ## Configuration -| Flag | Env | Default | Description | -| -------------------- | ------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `--framework ` | `COREUI_DOCS_FRAMEWORKS` | `bootstrap,react,vue` | Enabled editions (comma-separated). `angular` is available but off by default. The first is the default for tools. | -| `--base-url ` | `COREUI_DOCS_BASE_URL` | `https://coreui.io` | Origin of the CoreUI site. Override for a staging or self-hosted mirror. | -| `--base-path ` | `COREUI_DOCS_BASE_PATH` | `/{framework}/docs` | Path (after the origin) where a framework's docs live; `{framework}` is substituted. Set to e.g. `/data-grid/{framework}/docs`. | -| `--docs-path ` | `COREUI_DOCS_PATHS` | — | Per-framework path overrides, `fw=path` comma-separated. Wins over `--base-path`; use it where a slug breaks the template. | -| `--ttl ` | `COREUI_DOCS_TTL_MINUTES` | `360` | Cache freshness window. | -| — | `COREUI_DOCS_CACHE_DIR` | OS cache dir | On-disk cache location. | +| Flag | Env | Default | Description | +| -------------------- | ------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `--framework ` | `COREUI_DOCS_FRAMEWORKS` | `angular,bootstrap,react,vue` | Enabled editions (comma-separated). The first is the default for tools. | +| `--base-url ` | `COREUI_DOCS_BASE_URL` | `https://coreui.io` | Origin of the CoreUI site. Override for a staging or self-hosted mirror. | +| `--base-path ` | `COREUI_DOCS_BASE_PATH` | `/{framework}/docs` | Path (after the origin) where a framework's docs live; `{framework}` is substituted. Set to e.g. `/data-grid/{framework}/docs`. | +| `--docs-path ` | `COREUI_DOCS_PATHS` | — | Per-framework path overrides, `fw=path` comma-separated. Wins over `--base-path`; use it where a slug breaks the template. | +| `--ttl ` | `COREUI_DOCS_TTL_MINUTES` | `360` | Cache freshness window. | +| — | `COREUI_DOCS_CACHE_DIR` | OS cache dir | On-disk cache location. | ### CoreUI Data Grid diff --git a/src/config.ts b/src/config.ts index 2341d61..807c9fa 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,10 +4,9 @@ import { join } from 'node:path' export const FRAMEWORKS = ['bootstrap', 'react', 'vue', 'angular'] as const export type Framework = (typeof FRAMEWORKS)[number] -// Enabled by default when `--framework` is omitted. Angular is allowed (so a -// standalone product like Data Grid can opt into it) but stays out of the default -// set, which mirrors the main component-library docs currently on the engine. -export const DEFAULT_FRAMEWORKS: readonly Framework[] = ['bootstrap', 'react', 'vue'] +// Enabled by default when `--framework` is omitted — every edition whose docs serve +// the Markdown and llms endpoints this reads. +export const DEFAULT_FRAMEWORKS: readonly Framework[] = ['angular', 'bootstrap', 'react', 'vue'] // Path (after the origin) where a framework's docs live, with `{framework}` // substituted. The main library uses `//docs`; a standalone product diff --git a/test/config.test.ts b/test/config.test.ts index cbb94b3..764d9ba 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -3,12 +3,12 @@ import { describe, expect, it } from 'vitest' import { docsBase, docsPath, loadConfig } from '../src/config.js' describe('loadConfig frameworks', () => { - it('defaults to bootstrap, react, vue (angular excluded)', () => { + it('defaults to every edition', () => { const config = loadConfig([], {} as NodeJS.ProcessEnv) - expect(config.frameworks).toEqual(['bootstrap', 'react', 'vue']) + expect(config.frameworks).toEqual(['angular', 'bootstrap', 'react', 'vue']) }) - it('allows angular when requested explicitly', () => { + it('narrows to the requested editions', () => { const config = loadConfig(['--framework', 'angular,react'], {} as NodeJS.ProcessEnv) expect(config.frameworks).toEqual(['angular', 'react']) })