mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-28 17:57:48 +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
|
@ -43,7 +43,18 @@ export default {
|
|||
'/packages/docusaurus-utils/src/index.ts',
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.[jt]sx?$': '@swc/jest',
|
||||
'^.+\\.[jt]sx?$': [
|
||||
'@swc/jest',
|
||||
{
|
||||
jsc: {
|
||||
parser: {
|
||||
syntax: 'typescript',
|
||||
tsx: true,
|
||||
},
|
||||
target: 'es2020',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
errorOnDeprecated: true,
|
||||
reporters: ['default', 'github-actions'],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
__tests__
|
||||
node_modules
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"create-docusaurus": "create-docusaurus",
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"watch": "tsc -p tsconfig.build.json --watch"
|
||||
"build": "tsc --build",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"bin": "bin/index.js",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "es2020",
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
// For editor typechecking; includes bin
|
||||
{
|
||||
"extends": "./tsconfig.build.json",
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.build.json"}],
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"allowJs": true,
|
||||
"module": "esnext",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": ["src", "bin"]
|
||||
"include": ["bin"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"node": ">=14"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"watch": "tsc -p tsconfig.build.json --watch"
|
||||
"build": "tsc --build",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"rootDir": "src",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// For editor typechecking; includes bin
|
||||
{
|
||||
"extends": "./tsconfig.build.json",
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.build.json"}],
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"module": "esnext",
|
||||
"allowJs": true,
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": ["src", "bin"]
|
||||
"include": ["bin"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"types": "src/plugin-content-docs.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc --build",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/// <reference types="@docusaurus/module-type-aliases" />
|
||||
|
||||
declare module '@docusaurus/plugin-content-docs' {
|
||||
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
||||
import type {
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/// <reference types="@docusaurus/module-type-aliases" />
|
||||
|
||||
import type {BrokenMarkdownLink, Tag} from '@docusaurus/utils';
|
||||
import type {
|
||||
VersionMetadata,
|
||||
|
|
13
packages/docusaurus-plugin-content-docs/tsconfig.client.json
Normal file
13
packages/docusaurus-plugin-content-docs/tsconfig.client.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src/client", "src/*.d.ts"]
|
||||
}
|
|
@ -1,9 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.client.json"}],
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"module": "commonjs",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/client", "**/__tests__/**"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"main": "lib/index.js",
|
||||
"types": "src/plugin-debug.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc && node copyUntypedFiles.mjs",
|
||||
"build": "tsc --build && node copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"",
|
||||
"watch": "node copyUntypedFiles.mjs && tsc --watch"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
|
13
packages/docusaurus-plugin-debug/tsconfig.client.json
Normal file
13
packages/docusaurus-plugin-debug/tsconfig.client.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src/theme", "src/*.d.ts"]
|
||||
}
|
|
@ -1,9 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.client.json"}],
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"module": "commonjs",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/theme"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc --build",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"repository": {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src/analytics.ts", "src/*.d.ts"]
|
||||
}
|
|
@ -1,9 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.client.json"}],
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"module": "commonjs",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/analytics.ts"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc --build",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
|
13
packages/docusaurus-plugin-google-gtag/tsconfig.client.json
Normal file
13
packages/docusaurus-plugin-google-gtag/tsconfig.client.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src/gtag.ts", "src/options.ts", "src/*.d.ts"]
|
||||
}
|
|
@ -1,9 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.client.json"}],
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"module": "commonjs",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/gtag.ts"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -5,11 +5,7 @@
|
|||
"main": "lib/index.js",
|
||||
"types": "src/plugin-ideal-image.d.ts",
|
||||
"scripts": {
|
||||
"build": "yarn build:server && yarn build:browser && yarn build:copy && yarn build:format",
|
||||
"build:server": "tsc --project tsconfig.server.json",
|
||||
"build:browser": "tsc --project tsconfig.browser.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\""
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"jsx": "react-native"
|
||||
},
|
||||
"include": ["src/theme/", "src/*.d.ts"]
|
||||
}
|
13
packages/docusaurus-plugin-ideal-image/tsconfig.client.json
Normal file
13
packages/docusaurus-plugin-ideal-image/tsconfig.client.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src/theme", "src/*.d.ts"]
|
||||
}
|
|
@ -1,8 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.client.json"}],
|
||||
"compilerOptions": {
|
||||
"lib": ["DOM", "ES2019"],
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"module": "commonjs",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/theme"]
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["src/*.ts"]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
"main": "lib/index.js",
|
||||
"types": "src/plugin-pwa.d.ts",
|
||||
"scripts": {
|
||||
"build": "yarn build:server && yarn build:browser && yarn build:copy",
|
||||
"build:server": "tsc --project tsconfig.server.json",
|
||||
"build:browser": "tsc --project tsconfig.browser.json",
|
||||
"build:copy": "node copyUntypedFiles.mjs"
|
||||
"build": "tsc --build && node copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\""
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"jsx": "react-native"
|
||||
},
|
||||
"include": [
|
||||
"src/theme/",
|
||||
"src/*.d.ts",
|
||||
"src/registerSw.ts",
|
||||
"src/renderReloadPopup.tsx"
|
||||
]
|
||||
}
|
18
packages/docusaurus-plugin-pwa/tsconfig.client.json
Normal file
18
packages/docusaurus-plugin-pwa/tsconfig.client.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib",
|
||||
"module": "esnext",
|
||||
"target": "esnext"
|
||||
},
|
||||
"include": [
|
||||
"src/theme/",
|
||||
"src/*.d.ts",
|
||||
"src/registerSw.ts",
|
||||
"src/renderReloadPopup.tsx"
|
||||
]
|
||||
}
|
|
@ -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/theme/", "src/registerSw.ts", "src/renderReloadPopup.tsx"]
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["src/*.ts"],
|
||||
"exclude": [
|
||||
"src/theme/",
|
||||
"src/*.d.ts",
|
||||
"src/registerSw.ts",
|
||||
"src/renderReloadPopup.tsx"
|
||||
]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
"compilerOptions": {
|
||||
"lib": ["DOM", "ES2019"],
|
||||
"module": "esnext",
|
||||
"noEmit": true,
|
||||
"jsx": "react-native"
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src/"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"sourceMap": true,
|
||||
"declarationMap": true,
|
||||
"rootDir": "src",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -11,11 +11,7 @@
|
|||
"access": "public"
|
||||
},
|
||||
"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\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -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/*.d.ts", "src/custom-buble.ts"]
|
||||
"include": ["src/theme", "src/*.d.ts", "src/custom-buble.ts"]
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.client.json"}],
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/custom-buble.ts", "src/theme", "**/__tests__/**"]
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["src/*.ts"],
|
||||
"exclude": ["src/custom-buble.ts"]
|
||||
}
|
|
@ -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"]
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"watch": "tsc -p tsconfig.build.json --watch",
|
||||
"build": "tsc --build",
|
||||
"watch": "tsc --watch",
|
||||
"update": "node ./update.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"sourceMap": true,
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{"path": "./tsconfig.build.json"}],
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"noEmit": true,
|
||||
"checkJs": true,
|
||||
"allowJs": true
|
||||
},
|
||||
"include": ["update.mjs", "src"]
|
||||
"include": ["update.mjs"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
"docusaurus": "bin/docusaurus.mjs"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.server.json && tsc -p tsconfig.client.json && node copyUntypedFiles.mjs",
|
||||
"watch": "node copyUntypedFiles.mjs && concurrently -n \"server,client\" --kill-others \"tsc -p tsconfig.server.json --watch\" \"tsc -p tsconfig.client.json --watch\""
|
||||
"build": "tsc --build && node copyUntypedFiles.mjs",
|
||||
"watch": "node copyUntypedFiles.mjs && tsc --watch"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/docusaurus/issues"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"lib": ["DOM", "ES2019"],
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo-client",
|
||||
"module": "esnext",
|
||||
"tsBuildInfoFile": "./lib/client/.tsbuildinfo",
|
||||
"rootDir": "src/client",
|
||||
"outDir": "lib/client",
|
||||
"jsx": "react-native"
|
||||
"target": "esnext",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src/client", "src/deps.d.ts"]
|
||||
"include": ["src/client", "src/*.d.ts"]
|
||||
}
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
// For editor typechecking; includes bin
|
||||
{
|
||||
"extends": "./tsconfig.server.json",
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [
|
||||
{"path": "./tsconfig.server.json"},
|
||||
{"path": "./tsconfig.client.json"}
|
||||
],
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"rootDir": ".",
|
||||
"module": "esnext"
|
||||
},
|
||||
"include": ["src", "bin"]
|
||||
"include": ["bin"]
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo",
|
||||
"module": "commonjs",
|
||||
"rootDir": "src",
|
||||
"outDir": "lib",
|
||||
"allowJs": true
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["**/__tests__/**/*", "src/client"]
|
||||
"exclude": ["src/client", "**/__tests__/**"]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
.tsbuildinfo*
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"lib": ["ESNext", "DOM"],
|
||||
"declaration": true,
|
||||
"declarationMap": false,
|
||||
"jsx": "react",
|
||||
"jsx": "react-native",
|
||||
"importHelpers": true,
|
||||
"noEmitHelpers": true,
|
||||
|
||||
|
@ -44,5 +44,5 @@
|
|||
"isolatedModules": true,
|
||||
"skipLibCheck": true // @types/webpack and webpack/types.d.ts are not the same thing
|
||||
},
|
||||
"exclude": ["node_modules", "**/__tests__/**/*", "**/lib/**/*"]
|
||||
"exclude": ["node_modules", "**/__tests__/**", "**/lib/**/*"]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue