diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 592b5794d..e4d028635 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,3 +35,4 @@ jobs: - run: pnpm run test:build - run: pnpm run tsd - run: pnpm run vue-tsc + - run: pnpm run tsc:docs diff --git a/docs/.vitepress/config/en.mts b/docs/.vitepress/config/en.mts index d41f46882..f0e553066 100644 --- a/docs/.vitepress/config/en.mts +++ b/docs/.vitepress/config/en.mts @@ -1,10 +1,10 @@ -import type { DefaultTheme, LocalSpecificConfig } from 'vitepress' +import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress' export const META_URL = '' export const META_TITLE = 'Vue Test Utils' export const META_DESCRIPTION = 'The official testing suite utils for Vue.js 3' -export const enConfig: LocalSpecificConfig = { +export const enConfig: LocaleSpecificConfig = { description: META_DESCRIPTION, head: [ ['meta', { property: 'og:url', content: META_URL }], @@ -39,7 +39,6 @@ export const enConfig: LocalSpecificConfig = { }, { text: 'Essentials', - collapsable: false, items: [ { text: 'Getting Started', link: '/guide/' }, { text: 'A Crash Course', link: '/guide/essentials/a-crash-course' }, @@ -64,7 +63,6 @@ export const enConfig: LocalSpecificConfig = { }, { text: 'Vue Test Utils in depth', - collapsable: false, items: [ { text: 'Slots', link: '/guide/advanced/slots' }, { @@ -97,7 +95,6 @@ export const enConfig: LocalSpecificConfig = { }, { text: 'Extending Vue Test Utils', - collapsable: false, items: [ { text: 'Plugins', link: '/guide/extending-vtu/plugins' }, { diff --git a/docs/.vitepress/config/fr.mts b/docs/.vitepress/config/fr.mts index 4faf4e85f..33ba5f222 100644 --- a/docs/.vitepress/config/fr.mts +++ b/docs/.vitepress/config/fr.mts @@ -1,10 +1,10 @@ -import type { DefaultTheme, LocalSpecificConfig } from 'vitepress' +import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress' export const META_URL = '' export const META_TITLE = 'Vue Test Utils' export const META_DESCRIPTION = 'La librairie officielle de tests unitaires pour Vue.js 3' -export const frConfig: LocalSpecificConfig = { +export const frConfig: LocaleSpecificConfig = { description: META_DESCRIPTION, head: [ ['meta', { property: 'og:url', content: META_URL }], @@ -43,7 +43,6 @@ export const frConfig: LocalSpecificConfig = { }, { text: 'Les Bases', - collapsable: false, items: [ { text: 'Pour commencer', link: '/fr/guide/' }, { text: 'Cours rapide', link: '/fr/guide/essentials/a-crash-course' }, @@ -68,7 +67,6 @@ export const frConfig: LocalSpecificConfig = { }, { text: 'Vue Test Utils en détail', - collapsable: false, items: [ { text: 'Slots', link: '/fr/guide/advanced/slots' }, { @@ -101,7 +99,6 @@ export const frConfig: LocalSpecificConfig = { }, { text: 'Extensions de Vue Test Utils', - collapsable: false, items: [ { text: 'Plugins', link: '/fr/guide/extending-vtu/plugins' }, { diff --git a/docs/.vitepress/tsconfig.vitepress.json b/docs/.vitepress/tsconfig.vitepress.json new file mode 100644 index 000000000..1a11e5d76 --- /dev/null +++ b/docs/.vitepress/tsconfig.vitepress.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true, + "noEmit": true, + "allowImportingTsExtensions": true, + "resolveJsonModule": true + }, + "include": ["./config", "./theme"] +} diff --git a/package.json b/package.json index fd9ae1297..d23699ed2 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "test:watch": "vitest --watch", "test:build": "vitest --mode test-build", "tsd": "tsc -p test-dts/tsconfig.tsd.json", + "tsc:docs": "vue-tsc -p docs/.vitepress/tsconfig.vitepress.json", "build": "rollup -c rollup.config.ts --bundleConfigAsCjs", "prepare": "rollup -c rollup.config.ts --bundleConfigAsCjs", "lint": "eslint .", @@ -125,4 +126,4 @@ ] } } -} +} \ No newline at end of file