diff --git a/demos/package.json b/demos/package.json index 8bccb2105..c82536b2d 100644 --- a/demos/package.json +++ b/demos/package.json @@ -3,9 +3,9 @@ "version": "0.0.0", "private": true, "scripts": { - "start": "vite", - "build": "vue-tsc --noEmit && vite build", - "serve": "vite preview --port 3000" + "start": "vite --host", + "build": "yarn ts && vite build", + "ts": "tsc --project tsconfig.base.json --noEmit && tsc --project tsconfig.react.json --noEmit && tsc --project tsconfig.vue-2.json --noEmit && tsc --project tsconfig.vue-3.json --noEmit" }, "dependencies": { "@tiptap/core": "^2.0.0-beta.101", diff --git a/demos/src/Examples/Book/React/index.html b/demos/src/Examples/Book/React/index.html index f872b21f9..309bbfa1b 100644 --- a/demos/src/Examples/Book/React/index.html +++ b/demos/src/Examples/Book/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/CodeBlockLanguage/React/index.html b/demos/src/Examples/CodeBlockLanguage/React/index.html index 400f4fe54..09a714a12 100644 --- a/demos/src/Examples/CodeBlockLanguage/React/index.html +++ b/demos/src/Examples/CodeBlockLanguage/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Community/React/index.html b/demos/src/Examples/Community/React/index.html index 8e476b1ba..c6c2cd0a1 100644 --- a/demos/src/Examples/Community/React/index.html +++ b/demos/src/Examples/Community/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Default/React/index.html b/demos/src/Examples/Default/React/index.html index b1933555e..baf97efec 100644 --- a/demos/src/Examples/Default/React/index.html +++ b/demos/src/Examples/Default/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Formatting/React/index.html b/demos/src/Examples/Formatting/React/index.html index 9c319f28d..eee0df1a2 100644 --- a/demos/src/Examples/Formatting/React/index.html +++ b/demos/src/Examples/Formatting/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Images/React/index.html b/demos/src/Examples/Images/React/index.html index 496782692..f5c0e059b 100644 --- a/demos/src/Examples/Images/React/index.html +++ b/demos/src/Examples/Images/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/MarkdownShortcuts/React/index.html b/demos/src/Examples/MarkdownShortcuts/React/index.html index d208465eb..421b46520 100644 --- a/demos/src/Examples/MarkdownShortcuts/React/index.html +++ b/demos/src/Examples/MarkdownShortcuts/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Menus/React/index.html b/demos/src/Examples/Menus/React/index.html index 1b78073d7..c7b1aebc5 100644 --- a/demos/src/Examples/Menus/React/index.html +++ b/demos/src/Examples/Menus/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Minimal/React/index.html b/demos/src/Examples/Minimal/React/index.html index c687bebb9..00be49574 100644 --- a/demos/src/Examples/Minimal/React/index.html +++ b/demos/src/Examples/Minimal/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Tables/React/index.html b/demos/src/Examples/Tables/React/index.html index 263432777..9fa39dbcc 100644 --- a/demos/src/Examples/Tables/React/index.html +++ b/demos/src/Examples/Tables/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Examples/Tasks/React/index.html b/demos/src/Examples/Tasks/React/index.html index d78c18b1c..738b0797f 100644 --- a/demos/src/Examples/Tasks/React/index.html +++ b/demos/src/Examples/Tasks/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/Extensions/BubbleMenu/React/index.html b/demos/src/Extensions/BubbleMenu/React/index.html index 02352f625..cac1aa804 100644 --- a/demos/src/Extensions/BubbleMenu/React/index.html +++ b/demos/src/Extensions/BubbleMenu/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/GuideNodeViews/ReactComponent/React/index.html b/demos/src/GuideNodeViews/ReactComponent/React/index.html index c5e110755..a15eb6efc 100644 --- a/demos/src/GuideNodeViews/ReactComponent/React/index.html +++ b/demos/src/GuideNodeViews/ReactComponent/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/src/GuideNodeViews/ReactComponentContent/React/index.html b/demos/src/GuideNodeViews/ReactComponentContent/React/index.html index 9bb3c9a11..a2a89c2c8 100644 --- a/demos/src/GuideNodeViews/ReactComponentContent/React/index.html +++ b/demos/src/GuideNodeViews/ReactComponentContent/React/index.html @@ -7,7 +7,7 @@
diff --git a/demos/tsconfig.base.json b/demos/tsconfig.base.json new file mode 100644 index 000000000..c8e134f9d --- /dev/null +++ b/demos/tsconfig.base.json @@ -0,0 +1,21 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true, + "types": [ + "node" + ] + }, + "include": [ + "../packages/*/src/**/*.d.ts", + "../packages/*/src/**/*.ts", + "../packages/*/src/**/*.tsx", + "../packages/*/src/**/*.vue" + ], + "exclude": [ + "../packages/react", + "../packages/vue-2", + "../packages/vue-3", + "../packages/extension-code-block-lowlight" + ] +} diff --git a/demos/tsconfig.json b/demos/tsconfig.json deleted file mode 100644 index df5015380..000000000 --- a/demos/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@tiptap/*": ["../packages/*/dist", "../packages/*/src"] - }, - "types": [ - "node" - ] - }, - "include": [ - "**/*.vue" - ] -} diff --git a/demos/tsconfig.react.json b/demos/tsconfig.react.json new file mode 100644 index 000000000..826ded0cf --- /dev/null +++ b/demos/tsconfig.react.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true, + "types": [ + "node" + ] + }, + "include": [ + "../packages/react/src/*.d.ts", + "../packages/react/src/*.ts", + "../packages/react/src/*.tsx", + "../packages/react/src/*.vue" + ] +} diff --git a/demos/tsconfig.vue-2.json b/demos/tsconfig.vue-2.json new file mode 100644 index 000000000..8c42925d1 --- /dev/null +++ b/demos/tsconfig.vue-2.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true, + "types": [ + "node" + ] + }, + "include": [ + "../packages/vue-2/src/*.d.ts", + "../packages/vue-2/src/*.ts", + "../packages/vue-2/src/*.tsx", + "../packages/vue-2/src/*.vue" + ] +} diff --git a/demos/tsconfig.vue-3.json b/demos/tsconfig.vue-3.json new file mode 100644 index 000000000..02fae9f50 --- /dev/null +++ b/demos/tsconfig.vue-3.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true, + "types": [ + "node" + ] + }, + "include": [ + "../packages/vue-3/src/*.d.ts", + "../packages/vue-3/src/*.ts", + "../packages/vue-3/src/*.tsx", + "../packages/vue-3/src/*.vue" + ] +} diff --git a/demos/vite.config.ts b/demos/vite.config.ts index 71c4aed46..356321f17 100644 --- a/demos/vite.config.ts +++ b/demos/vite.config.ts @@ -10,7 +10,7 @@ import globby from 'globby' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import reactRefresh from '@vitejs/plugin-react-refresh' -import checker from 'vite-plugin-checker' +// import checker from 'vite-plugin-checker' export default defineConfig({ optimizeDeps: { @@ -35,6 +35,7 @@ export default defineConfig({ 'y-webrtc', 'lowlight', 'lowlight/lib/core', + 'shiki', ], }, @@ -47,8 +48,10 @@ export default defineConfig({ }, plugins: [ - // checker({ typescript: { tsconfigPath: '../tsconfig.json' } }), - // checker({ typescript: true }), + // checker({ typescript: { tsconfigPath: './tsconfig.base.json' } }), + // checker({ typescript: { tsconfigPath: './tsconfig.react.json' } }), + // checker({ typescript: { tsconfigPath: './tsconfig.vue-2.json' } }), + // checker({ typescript: { tsconfigPath: './tsconfig.vue-3.json' } }), vue(), reactRefresh(), diff --git a/tsconfig.json b/tsconfig.json index a79c326b1..55ac0d6cc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,8 +29,8 @@ "./env.d.ts" ], "include": [ - "**/*.ts", "**/*.d.ts", + "**/*.ts", "**/*.tsx", "**/*.vue" ],