check ts correctly on demo build

This commit is contained in:
Philipp Kühn 2021-09-17 23:44:01 +02:00
parent 35cf2aee4c
commit ddc4986df1
22 changed files with 90 additions and 36 deletions

View File

@ -3,9 +3,9 @@
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "vite", "start": "vite --host",
"build": "vue-tsc --noEmit && vite build", "build": "yarn ts && vite build",
"serve": "vite preview --port 3000" "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": { "dependencies": {
"@tiptap/core": "^2.0.0-beta.101", "@tiptap/core": "^2.0.0-beta.101",

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Book', source) setup('Examples/Book', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/CodeBlockLanguage', source) setup('Examples/CodeBlockLanguage', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Community', source) setup('Examples/Community', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Default', source) setup('Examples/Default', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Formatting', source) setup('Examples/Formatting', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Images', source) setup('Examples/Images', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/MarkdownShortcuts', source) setup('Examples/MarkdownShortcuts', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Menus', source) setup('Examples/Menus', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Minimal', source) setup('Examples/Minimal', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Tables', source) setup('Examples/Tables', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Examples/Tasks', source) setup('Examples/Tasks', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('Extensions/BubbleMenu', source) setup('Extensions/BubbleMenu', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('GuideNodeViews/ReactComponent', source) setup('GuideNodeViews/ReactComponent', source)
</script> </script>

View File

@ -7,7 +7,7 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module"> <script type="module">
import setup from '../../../../setup/react.tsx' import setup from '../../../../setup/react.ts'
import source from '@source' import source from '@source'
setup('GuideNodeViews/ReactComponentContent', source) setup('GuideNodeViews/ReactComponentContent', source)
</script> </script>

21
demos/tsconfig.base.json Normal file
View File

@ -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"
]
}

View File

@ -1,15 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@tiptap/*": ["../packages/*/dist", "../packages/*/src"]
},
"types": [
"node"
]
},
"include": [
"**/*.vue"
]
}

15
demos/tsconfig.react.json Normal file
View File

@ -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"
]
}

15
demos/tsconfig.vue-2.json Normal file
View File

@ -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"
]
}

15
demos/tsconfig.vue-3.json Normal file
View File

@ -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"
]
}

View File

@ -10,7 +10,7 @@ import globby from 'globby'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import reactRefresh from '@vitejs/plugin-react-refresh' import reactRefresh from '@vitejs/plugin-react-refresh'
import checker from 'vite-plugin-checker' // import checker from 'vite-plugin-checker'
export default defineConfig({ export default defineConfig({
optimizeDeps: { optimizeDeps: {
@ -35,6 +35,7 @@ export default defineConfig({
'y-webrtc', 'y-webrtc',
'lowlight', 'lowlight',
'lowlight/lib/core', 'lowlight/lib/core',
'shiki',
], ],
}, },
@ -47,8 +48,10 @@ export default defineConfig({
}, },
plugins: [ plugins: [
// checker({ typescript: { tsconfigPath: '../tsconfig.json' } }), // checker({ typescript: { tsconfigPath: './tsconfig.base.json' } }),
// checker({ typescript: true }), // checker({ typescript: { tsconfigPath: './tsconfig.react.json' } }),
// checker({ typescript: { tsconfigPath: './tsconfig.vue-2.json' } }),
// checker({ typescript: { tsconfigPath: './tsconfig.vue-3.json' } }),
vue(), vue(),
reactRefresh(), reactRefresh(),

View File

@ -29,8 +29,8 @@
"./env.d.ts" "./env.d.ts"
], ],
"include": [ "include": [
"**/*.ts",
"**/*.d.ts", "**/*.d.ts",
"**/*.ts",
"**/*.tsx", "**/*.tsx",
"**/*.vue" "**/*.vue"
], ],