From 0f1ffc99cd0a241fbdc58b6c19f37c3dd751303c Mon Sep 17 00:00:00 2001 From: Konv Suu <2583695112@qq.com> Date: Fri, 15 Sep 2023 14:18:44 +0800 Subject: [PATCH] chore: optimize startup performance (#6952) --- package.json | 6 +++--- scripts/generate-token-meta.js | 1 + tsconfig.node.json | 7 ------- 3 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 tsconfig.node.json diff --git a/package.json b/package.json index 8a3200842..69458a7de 100644 --- a/package.json +++ b/package.json @@ -30,14 +30,14 @@ "locale" ], "scripts": { - "collect-token-statistic": "ts-node --project tsconfig.node.json scripts/collect-token-statistic.js", + "collect-token-statistic": "tsx scripts/collect-token-statistic.js", "token-meta": "node scripts/generate-token-meta.js", "predev": "npm run version & npm run collect-token-statistic & npm run token-meta && node node_modules/esbuild/install.js", "precompile": "npm run version & npm run collect-token-statistic & npm run token-meta", "pretest": "npm run version", "predist": "npm run version", "presite": "npm run version & npm run routes & npm run collect-token-statistic & npm run token-meta", - "dev": "npm run predev && npm run routes && vite serve site", + "dev": "npm run routes && vite serve site", "fast-dev": "npm run routes && vite serve site", "test": "cross-env NODE_ENV=test jest --config .jest.js", "compile": "node antd-tools/cli/run.js compile", @@ -250,7 +250,7 @@ "tinycolor2": "^1.6.0", "ts-jest": "^28.0.5", "ts-loader": "^9.1.0", - "ts-node": "^10.8.2", + "tsx": "^3.12.10", "typedoc": "^0.23.25", "typescript": "~4.9.3", "umi-request": "^1.3.5", diff --git a/scripts/generate-token-meta.js b/scripts/generate-token-meta.js index 48b60f7e9..6c594e5f0 100644 --- a/scripts/generate-token-meta.js +++ b/scripts/generate-token-meta.js @@ -39,6 +39,7 @@ function main() { app.bootstrap({ // typedoc options here entryPoints: ['components/theme/interface/index.ts'], + skipErrorChecking: true, }); const project = app.convert(); diff --git a/tsconfig.node.json b/tsconfig.node.json deleted file mode 100644 index d58b1bdd7..000000000 --- a/tsconfig.node.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "CommonJS", - "types": ["node"] - } -}