Skip to content

Commit

Permalink
feat(*): optimize dts build speed
Browse files Browse the repository at this point in the history
  • Loading branch information
moecasts committed Feb 7, 2025
1 parent cac8797 commit 4750143
Show file tree
Hide file tree
Showing 98 changed files with 419 additions and 99 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"ahooks": "^3.7.8",
"clsx": "^2.0.0",
"copy-to-clipboard": "^3.3.3",
"cross-env": "^7.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"mathjs": "^12.3.1",
Expand All @@ -128,5 +129,10 @@
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"pnpm": {
"patchedDependencies": {
"father@4.5.2": "patches/father@4.5.2.patch"
}
}
}
2 changes: 1 addition & 1 deletion packages/casts-affix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-affix/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-alert/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-anchor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-anchor/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-avatar/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-badge/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-breadcrumbs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-breadcrumbs/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-button/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-checkbox/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
2 changes: 1 addition & 1 deletion packages/casts-cli/templates/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-cli/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-code/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-common/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-config-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-config-provider/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-date-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-date-picker/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-dialog/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-divider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-divider/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-drawer/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-dropdown/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-empty/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-empty/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-form/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-grid/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:icons": "svgr --config-file ./svgr.config.js -d ./src/icons ./assets/raw && eslint ./src --fix && npm run build:index && npm run build:example-icon-list",
"build:example-icon-list": "ts-node ./scripts/create-examples-icon-list.ts",
"build:index": "ts-node ./scripts/create-root-index.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-icons/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-input-number/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-input-number/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
2 changes: 1 addition & 1 deletion packages/casts-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "dist/esm/index.d.ts",
"scripts": {
"dev": "father dev",
"build": "father build",
"build": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build",
"build:deps": "father prebundle",
"prepublishOnly": "father doctor && pnpm run build",
"test": "vitest",
Expand Down
6 changes: 6 additions & 0 deletions packages/casts-input/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
Loading

0 comments on commit 4750143

Please sign in to comment.