chore: add type-check script and integrate type checking in build workflow (#201)

This commit is contained in:
Whitewater
2025-12-23 14:32:33 +08:00
committed by GitHub
parent 9a99dd8e07
commit 7be1e5e829
6 changed files with 13 additions and 5 deletions

View File

@@ -39,4 +39,8 @@ jobs:
with:
run_install: true
- run: echo '{"version":"v2","data":[]}' > apps/web/src/data/photos-manifest.json
- run: cd apps/web && pnpm vite build
- name: Type check
run: |
pnpm type-check
- run: pnpm vite build
working-directory: ./apps/web

View File

@@ -11,7 +11,8 @@
"dev": "vite",
"lint": "eslint .",
"output": "tsx scripts/build.ts",
"preview": "pnpm dlx serve dist"
"preview": "pnpm dlx serve dist",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@afilmory/ui": "workspace:*",

View File

@@ -10,7 +10,8 @@
"dev": "cross-env NODE_ENV=development next dev --turbopack -p 1111",
"lint": "eslint --cache --fix",
"prepare": "pnpm exec simple-git-hooks && test -f .env || cp .env.template .env",
"start": "npm run dev"
"start": "npm run dev",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@floating-ui/react-dom": "2.1.6",

View File

@@ -27,6 +27,7 @@
"preinstall": "sh scripts/preinstall.sh",
"prepare": "simple-git-hooks",
"reinstall": "rm -rf **/*/node_modules && rm -rf node_modules && pnpm install",
"type-check": "pnpm run -r type-check",
"update:lastmodified": "tsx scripts/update-lastmodified.ts"
},
"dependencies": {

View File

@@ -9,7 +9,8 @@
"scripts": {
"build": "tsdown",
"bump": "nbump",
"cli": "tsx src/cli.ts"
"cli": "tsx src/cli.ts",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@vingle/bmp-js": "^0.2.5",

View File

@@ -17,7 +17,7 @@ export default defineConfig({
plugins: [
dts({
include: ['src/**/*.ts', 'src/**/*.tsx'],
outDir: 'dist',
outDirs: ['dist'],
tsconfigPath: 'tsconfig.json',
}),
],