Skip to content

Commit 17f6c4d

Browse files
Use tsup to bundle dts (#2)
1 parent b453bda commit 17f6c4d

File tree

10 files changed

+10
-26
lines changed

10 files changed

+10
-26
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "module",
77
"scripts": {
88
"build": "pnpm -r build",
9-
"build:all": "pnpm -r build && pnpm -r build:types && pnpm install && pnpm copy-files && cd example && pnpm build:fbtee",
9+
"build:all": "pnpm -r build && pnpm install && pnpm copy-files && cd example && pnpm build:fbtee",
1010
"clean": "rm -rf packages/*/lib; cd example pnpm clean",
1111
"copy-files": "find packages/* -type d -maxdepth 0 -exec cp README.md LICENSE {} \\;",
1212
"dev": "cd example && pnpm build:fbtee && pnpm dev",
@@ -41,7 +41,6 @@
4141
"@types/react": "^19.0.0",
4242
"@types/react-dom": "^19.0.0",
4343
"@types/yargs": "^17.0.33",
44-
"dts-bundle-generator": "^9.5.1",
4544
"eslint": "^8.0.0",
4645
"eslint-plugin-workspaces": "^0.10.1",
4746
"invariant": "^2.2.4",

packages/babel-fbtee/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"fbtee": "lib/bin.js"
2424
},
2525
"scripts": {
26-
"build": "tsup src/index.tsx src/bin.tsx -d lib --target=node22 --format=esm --clean --no-splitting",
27-
"build:types": "dts-bundle-generator -o lib/index.d.ts src/index.tsx"
26+
"build": "tsup src/index.tsx src/bin.tsx -d lib --target=node22 --format=esm --clean --no-splitting --dts"
2827
},
2928
"dependencies": {
3029
"@nkzw/babel-plugin-fbtee": "workspace:^",

packages/babel-plugin-fbtee-auto-import/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"type": "module",
2121
"main": "lib/index.js",
2222
"scripts": {
23-
"build": "tsup src/index.tsx -d lib --target=node22 --format=esm --clean --no-splitting",
24-
"build:types": "dts-bundle-generator -o lib/index.d.ts src/index.tsx"
23+
"build": "tsup src/index.tsx -d lib --target=node22 --format=esm --clean --no-splitting --dts"
2524
},
2625
"dependencies": {
2726
"@babel/core": "^7.26.0",

packages/babel-plugin-fbtee-runtime/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"type": "module",
2121
"main": "lib/index.js",
2222
"scripts": {
23-
"build": "tsup src/index.tsx -d lib --target=node22 --format=esm --clean --no-splitting",
24-
"build:types": "dts-bundle-generator -o lib/index.d.ts src/index.tsx"
23+
"build": "tsup src/index.tsx -d lib --target=node22 --format=esm --clean --no-splitting --dts"
2524
},
2625
"dependencies": {
2726
"@babel/core": "^7.26.0",

packages/babel-plugin-fbtee/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"fbtee": "lib/bin.js"
2424
},
2525
"scripts": {
26-
"build": "tsup src/index.tsx src/bin.tsx -d lib --target=node22 --format=esm --clean --no-splitting",
27-
"build:types": "dts-bundle-generator -o lib/index.d.ts src/index.tsx"
26+
"build": "tsup src/index.tsx src/bin.tsx -d lib --target=node22 --format=esm --clean --no-splitting --dts"
2827
},
2928
"dependencies": {
3029
"@babel/core": "^7.26.0",

packages/babel-plugin-fbtee/src/bin.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ if (command === 'manifest') {
99
} else if (command === 'collect') {
1010
import('./bin/collect.tsx');
1111
}
12+
13+
export default {};

packages/babel-plugin-fbtee/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { checkOption, errorAt } from './FbtUtil.tsx';
2424
import { FbtVariationType } from './translate/IntlVariations.tsx';
2525
import type { FbtTableKey, PatternHash, PatternString } from './Types.d.ts';
2626

27+
export type { FbtTableKey, PatternHash, PatternString };
2728
export { SENTINEL } from './FbtConstants.tsx';
2829
export { default as fbtHashKey } from './fbtHashKey.tsx';
2930
export { mapLeaves } from './JSFbtUtil.tsx';

packages/fbtee/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"type": "module",
2121
"main": "lib/index.js",
2222
"scripts": {
23-
"build": "tsup src/index.tsx -d lib --target=node22 --format=esm --clean --no-splitting",
24-
"build:types": "dts-bundle-generator -o lib/index.d.ts src/index.tsx"
23+
"build": "tsup src/index.tsx -d lib --target=node22 --format=esm --clean --no-splitting --dts"
2524
},
2625
"dependencies": {
2726
"invariant": "^2.2.4"

pnpm-lock.yaml

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"allowImportingTsExtensions": true,
55
"esModuleInterop": true,
66
"forceConsistentCasingInFileNames": true,
7-
"incremental": true,
7+
"incremental": false,
88
"isolatedModules": true,
99
"jsx": "preserve",
1010
"lib": ["dom", "dom.iterable", "esnext"],

0 commit comments

Comments
 (0)