mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
refactor: use TS project references instead of running tsc multiple times (#7437)
* refactor: use TS project references instead of running tsc multiple times * deduplicate * dedup * eliminate --project * add swc config * add target
This commit is contained in:
parent
1bec5f673a
commit
7613ecb9ea
76 changed files with 233 additions and 145 deletions
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -21,11 +21,7 @@
|
|||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "yarn build:server && yarn build:client && yarn build:copy && yarn build:format",
|
||||
"build:server": "tsc --project tsconfig.server.json",
|
||||
"build:client": "tsc --project tsconfig.client.json",
|
||||
"build:copy": "node copyUntypedFiles.mjs",
|
||||
"build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\""
|
||||
"build": "tsc --build && node copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@docsearch/react": "^3.0.0",
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib",
|
||||
"module": "esnext",
|
||||
"jsx": "react-native"
|
||||
"target": "esnext"
|
||||
},
|
||||
"include": ["src/theme/", "src/client/", "src/*.d.ts"]
|
||||
"include": ["src/theme", "src/client", "src/*.d.ts"]
|
||||
}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.client.json"}],
|
||||
"compilerOptions": {
|
||||
"lib": ["DOM", "ES2019"],
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/client", "src/theme", "**/__tests__/**"]
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["src/*.ts", "src/templates/*.ts"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue