mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-20 15:10:59 +08:00
chore: update TypeScript configuration and scripts (#9792)
- Added support for TypeScript incremental builds by enabling the `incremental` option and specifying the `tsBuildInfoFile` in both `tsconfig.node.json` and `tsconfig.web.json`. - Updated the `typecheck` script in `package.json` to use `concurrently` for running node and web type checks in parallel. - Added `.tsbuildinfo` to `.gitignore` to prevent build info files from being tracked.
This commit is contained in:
parent
2c0391da81
commit
d6dcb471f9
3
.gitignore
vendored
3
.gitignore
vendored
@ -60,6 +60,9 @@ coverage
|
|||||||
.vitest-cache
|
.vitest-cache
|
||||||
vitest.config.*.timestamp-*
|
vitest.config.*.timestamp-*
|
||||||
|
|
||||||
|
# TypeScript incremental build
|
||||||
|
.tsbuildinfo
|
||||||
|
|
||||||
# playwright
|
# playwright
|
||||||
playwright-report
|
playwright-report
|
||||||
test-results
|
test-results
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
"generate:icons": "electron-icon-builder --input=./build/logo.png --output=build",
|
"generate:icons": "electron-icon-builder --input=./build/logo.png --output=build",
|
||||||
"analyze:renderer": "VISUALIZER_RENDERER=true yarn build",
|
"analyze:renderer": "VISUALIZER_RENDERER=true yarn build",
|
||||||
"analyze:main": "VISUALIZER_MAIN=true yarn build",
|
"analyze:main": "VISUALIZER_MAIN=true yarn build",
|
||||||
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
"typecheck": "concurrently -n \"node,web\" -c \"cyan,magenta\" \"npm run typecheck:node\" \"npm run typecheck:web\"",
|
||||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
||||||
"check:i18n": "tsx scripts/check-i18n.ts",
|
"check:i18n": "tsx scripts/check-i18n.ts",
|
||||||
@ -200,6 +200,7 @@
|
|||||||
"cli-progress": "^3.12.0",
|
"cli-progress": "^3.12.0",
|
||||||
"code-inspector-plugin": "^0.20.14",
|
"code-inspector-plugin": "^0.20.14",
|
||||||
"color": "^5.0.0",
|
"color": "^5.0.0",
|
||||||
|
"concurrently": "^9.2.1",
|
||||||
"country-flag-emoji-polyfill": "0.1.8",
|
"country-flag-emoji-polyfill": "0.1.8",
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.11",
|
||||||
"dexie": "^4.0.8",
|
"dexie": "^4.0.8",
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
"src/renderer/src/services/traceApi.ts" ],
|
"src/renderer/src/services/traceApi.ts" ],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
|
"incremental": true,
|
||||||
|
"tsBuildInfoFile": ".tsbuildinfo/tsconfig.node.tsbuildinfo",
|
||||||
"types": [
|
"types": [
|
||||||
"electron-vite/node",
|
"electron-vite/node",
|
||||||
"vitest/globals"
|
"vitest/globals"
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
|
"incremental": true,
|
||||||
|
"tsBuildInfoFile": ".tsbuildinfo/tsconfig.web.tsbuildinfo",
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user