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",
"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",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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