chore: use `nuxt.config` to enable pages for docs typecheck

This commit is contained in:
Daniel Roe 2024-02-16 17:18:50 +00:00
parent f42045746f
commit 72a2e23cc4
4 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1 @@
telemetry.enabled=false telemetry.enabled=false
# For pnpm typecheck:docs to generate correct types
pages=true

4
nuxt.config.ts Normal file
View File

@ -0,0 +1,4 @@
// For pnpm typecheck:docs to generate correct types
export default defineNuxtConfig({
pages: process.env.DOCS_TYPECHECK === 'true'
})

View File

@ -30,7 +30,7 @@
"test:types": "pnpm --filter './test/fixtures/**' test:types", "test:types": "pnpm --filter './test/fixtures/**' test:types",
"test:unit": "vitest run packages/ --coverage", "test:unit": "vitest run packages/ --coverage",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"typecheck:docs": "nuxi prepare && nuxt-content-twoslash verify --content-dir docs" "typecheck:docs": "DOCS_TYPECHECK=true pnpm nuxi prepare && nuxt-content-twoslash verify --content-dir docs"
}, },
"resolutions": { "resolutions": {
"@nuxt/kit": "workspace:*", "@nuxt/kit": "workspace:*",

View File

@ -10,7 +10,6 @@ export default defineVitestConfig({
environmentOptions: { environmentOptions: {
nuxt: { nuxt: {
overrides: { overrides: {
pages: false,
appConfig: { appConfig: {
nuxt: { nuxt: {
buildId: 'override' buildId: 'override'