An open source design system that's fully customizable and agent ready
TypeScript
ci: typecheck template.doc.mjs files in CI (#1104)
Joey2531f987f325
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 53a83ac3c0..02b7e700c1 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -67,6 +67,9 @@ jobs:- name: Typecheck component docsrun: yarn workspace @xds/core typecheck:docs+ - name: Typecheck template docs+ run: yarn workspace @xds/cli typecheck:template-docs+# Build storybook + analyze components (parallel with test)# Uploads storybook preview and analysis artifacts for downstream jobsbuild:diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex f8b5d8c7ca..5c5b37a3ec 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -13,7 +13,8 @@"docs"],"scripts": {- "xds": "node bin/xds.mjs"+ "xds": "node bin/xds.mjs",+ "typecheck:template-docs": "tsc --project tsconfig.template-docs.json"},"dependencies": {"@clack/prompts": "^0.9.1",diff --git a/packages/cli/templates/demo-dashboard/template.doc.mjs b/packages/cli/templates/demo-dashboard/template.doc.mjsindex 98ac22431b..41c054497e 100644--- a/packages/cli/templates/demo-dashboard/template.doc.mjs+++ b/packages/cli/templates/demo-dashboard/template.doc.mjs@@ -1,4 +1,4 @@-/** @type {import('@xds/core').TemplateDoc} */+/** @type {import('../../../core/src/docs-types').TemplateDoc} */export const doc = {name: 'Dashboard',description: 'Analytics dashboard with KPI cards and a data table.',diff --git a/packages/cli/tsconfig.template-docs.json b/packages/cli/tsconfig.template-docs.jsonnew file mode 100644index 0000000000..cca45d9b49--- /dev/null+++ b/packages/cli/tsconfig.template-docs.json@@ -0,0 +1,13 @@+{+ "extends": "../../tsconfig.json",+ "compilerOptions": {+ "rootDir": "../..",+ "allowJs": true,+ "checkJs": true,+ "noEmit": true+ },+ "include": [+ "templates/**/template.doc.mjs",+ "../core/src/docs-types.ts"+ ]+}