Skip to content

Commit 1af3c64

Browse files
committed
chore(ts): update ts setup ; fix build
1 parent 76538c8 commit 1af3c64

File tree

5 files changed

+77
-118
lines changed

5 files changed

+77
-118
lines changed

docs/app.config.ts

-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ export default defineAppConfig({
77
twitter: 'yaeeelglx',
88
github: 'vueuse/motion',
99
},
10-
github: true,
1110
aside: {
1211
level: 1,
13-
filter: [],
1412
},
1513
header: {
1614
title: '@vueuse/motion',
@@ -21,7 +19,6 @@ export default defineAppConfig({
2119
text: 'Powered by Docus',
2220
href: 'https://docus.dev',
2321
},
24-
icons: [],
2522
},
2623
},
2724
})

docs/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"scripts": {
44
"dev:docs": "nuxt dev",
55
"build:docs": "nuxt generate",
6-
"preview:docs": "nuxt preview"
6+
"preview:docs": "nuxt preview",
7+
"prepare:docs": "nuxt prepare"
78
},
89
"dependencies": {
910
"@vueuse/motion": "workspace:~"

env.d.ts

-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,3 @@
44
declare const __DEV__: boolean
55
declare const __BROWSER__: boolean
66
declare const __CI__: boolean
7-
8-
// Global .vue shim
9-
declare module '*.vue' {
10-
import type { DefineComponent } from 'vue'
11-
const component: DefineComponent<{}, {}, any>
12-
export default component
13-
}

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"test:unit": "vitest run",
4646
"test:coverage": "vitest run --coverage",
4747
"test": "pnpm test:unit && pnpm test:coverage",
48-
"prepare": "pnpm prepare:nuxt",
48+
"prepare": "pnpm prepare:nuxt && pnpm prepare:docs",
4949
"__": "__",
5050
"dev:nuxt": "(cd playgrounds/nuxt && pnpm dev:nuxt)",
5151
"build:nuxt": "(cd playgrounds/nuxt && pnpm build:nuxt)",
@@ -59,7 +59,8 @@
5959
"dev:docs": "(cd docs && pnpm dev:docs)",
6060
"build:docs": "(cd docs && pnpm build:docs)",
6161
"preview:docs": "(cd docs && pnpm preview:docs)",
62-
"prepare:nuxt": "(cd playgrounds/nuxt && pnpm prepare:nuxt)"
62+
"prepare:nuxt": "(cd playgrounds/nuxt && pnpm prepare:nuxt)",
63+
"prepare:docs": "(cd docs && pnpm prepare:docs)"
6364
},
6465
"peerDependencies": {
6566
"vue": ">=3.0.0"

tsconfig.json

+72-105
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,97 @@
11
{
2-
"extends": "./playgrounds/nuxt/.nuxt/tsconfig.json",
3-
4-
"include": [
5-
"env.d.ts",
6-
"src/**/*",
7-
"tests/**/*",
8-
"docs/**/*",
9-
"playgrounds/**/*"
10-
],
11-
12-
"exclude": ["dist", "node_modules"],
13-
2+
"extends": "./docs/.nuxt/tsconfig.json",
143
"compilerOptions": {
15-
"types": ["node", "vite/client", "vitest/globals"],
16-
"lib": ["esnext", "dom"],
4+
"forceConsistentCasingInFileNames": true,
5+
"jsx": "preserve",
6+
"target": "ESNext",
7+
"module": "ESNext",
8+
"moduleResolution": "Node",
9+
"skipLibCheck": true,
10+
"strict": true,
11+
"allowJs": true,
12+
"noEmit": true,
13+
"resolveJsonModule": true,
14+
"allowSyntheticDefaultImports": true,
15+
"types": [
16+
"node",
17+
"csstype",
18+
"vitest",
19+
"vitest/globals",
20+
"vite/client"
21+
],
22+
"baseUrl": ".",
1723
"paths": {
18-
"@vueuse/motion/*": [
19-
"./src/*"
20-
],
21-
"csstype": [
22-
"node_modules/csstype"
23-
],
24-
"~~": [
25-
"."
26-
],
27-
"~~/*": [
28-
"./*"
29-
],
30-
"@@": [
31-
"."
32-
],
33-
"@@/*": [
34-
"./*"
35-
],
36-
"~": [
37-
"."
38-
],
39-
"~/*": [
40-
"./*"
41-
],
42-
"@": [
43-
"."
44-
],
45-
"@/*": [
46-
"./*"
47-
],
48-
"assets": [
49-
"assets"
50-
],
51-
"public": [
52-
"public"
24+
"@vueuse/motion": [
25+
"./src/index"
5326
],
54-
"public/*": [
55-
"public/*"
27+
"@vueuse/motion/nuxt": [
28+
"./src/nuxt/module"
5629
],
5730
"#app": [
58-
"node_modules/nuxt/dist/app"
31+
"./node_modules/nuxt/dist/app"
5932
],
6033
"#app/*": [
61-
"node_modules/nuxt/dist/app/*"
34+
"./node_modules/nuxt/dist/app/*"
6235
],
6336
"vue-demi": [
64-
"node_modules/nuxt/dist/app/compat/vue-demi"
65-
],
66-
"tslib": [
67-
"tslib/tslib.es6"
68-
],
69-
"#design-tokens": [
70-
"docs/.nuxt/tokens/index"
71-
],
72-
"#design-tokens/style": [
73-
"docs/.nuxt/tokens/tokens"
74-
],
75-
"#design-tokens/types": [
76-
"docs/.nuxt/tokens/types"
37+
"./node_modules/nuxt/dist/app/compat/vue-demi"
7738
],
7839
"#color-mode-options": [
79-
"docs/.nuxt/color-mode-options"
40+
"./docs/.nuxt/color-mode-options"
8041
],
81-
"#head": [
82-
"node_modules/nuxt/dist/head/runtime"
42+
"#nuxt-component-meta": [
43+
"./docs/.nuxt/component-meta.mjs"
8344
],
84-
"#head/*": [
85-
"node_modules/nuxt/dist/head/runtime/*"
45+
"#nuxt-component-meta/types": [
46+
"./docs/.nuxt/component-meta.d.ts"
47+
],
48+
"#vue-router": [
49+
"./docs/.nuxt/vue-router"
8650
],
8751
"#imports": [
88-
"docs/.nuxt/imports"
52+
"./docs/.nuxt/imports"
8953
],
9054
"#build": [
91-
"docs/.nuxt"
55+
"./docs/.nuxt"
9256
],
9357
"#build/*": [
94-
"docs/.nuxt/*"
58+
"./docs/.nuxt/*"
9559
],
96-
"#components": [
97-
"docs/.nuxt/components"
60+
"@nuxt-themes/tokens/config": [
61+
"./node_modules/@nuxt-themes/tokens/dist/tokens.config.ts"
9862
],
99-
"@vueuse/motion": [
100-
"./src/index.ts"
63+
"#pinceau/utils": [
64+
"./docs/.nuxt/pinceau/utils.ts"
65+
],
66+
"#pinceau/theme": [
67+
"./docs/.nuxt/pinceau/index.ts"
68+
],
69+
"#pinceau/schema": [
70+
"./docs/.nuxt/pinceau/schema.ts"
71+
],
72+
"#pinceau/definitions": [
73+
"./docs/.nuxt/pinceau/definitions.ts"
74+
],
75+
"#components": [
76+
".nuxt/components"
10177
]
102-
},
103-
104-
"baseUrl": ".",
105-
"rootDir": ".",
106-
"outDir": "dist",
107-
"sourceMap": false,
108-
"noEmit": true,
109-
110-
"target": "esnext",
111-
"module": "esnext",
112-
"moduleResolution": "node",
113-
"skipLibCheck": true,
114-
115-
"noUnusedLocals": true,
116-
"strictNullChecks": true,
117-
"noImplicitAny": true,
118-
"noImplicitThis": true,
119-
"noImplicitReturns": true,
120-
"strict": true,
121-
"isolatedModules": false,
122-
123-
"experimentalDecorators": true,
124-
"resolveJsonModule": true,
125-
"esModuleInterop": true,
126-
"removeComments": false,
127-
"strictPropertyInitialization": false,
128-
"jsx": "preserve"
78+
}
79+
},
80+
"include": [
81+
"./env.d.ts",
82+
"docs/**/*",
83+
"src/**/*",
84+
"tests/**/*",
85+
"docs/**/*",
86+
"playgrounds/**/*"
87+
],
88+
"exclude": [
89+
"../dist",
90+
"../.output"
91+
],
92+
"vueCompilerOptions": {
93+
"plugins": [
94+
"pinceau/volar"
95+
]
12996
}
13097
}

0 commit comments

Comments
 (0)