Skip to content

Commit 618f358

Browse files
committed
refactor(projects): use tsdown replace tsup
1 parent 7a34eb0 commit 618f358

File tree

12 files changed

+299
-587
lines changed

12 files changed

+299
-587
lines changed

package.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,29 @@
1818
"url": "https://github.com/soybeanjs/cli/issues"
1919
},
2020
"publishConfig": {
21-
"registry": "https://registry.npmjs.org/"
21+
"registry": "https://registry.npmjs.org/",
22+
"bin": {
23+
"soybean": "dist/index.js",
24+
"soy": "dist/index.js"
25+
}
2226
},
2327
"bin": {
24-
"soybean": "dist/index.js",
25-
"soy": "dist/index.cjs"
28+
"soybean": "./src/bin.js",
29+
"soy": "./src/bin.js"
2630
},
2731
"exports": {
2832
".": {
2933
"types": "./dist/index.d.ts",
3034
"import": "./dist/index.js",
31-
"require": "./dist/index.cjs"
35+
"require": "./dist/index.js"
3236
}
3337
},
34-
"main": "dist/index.cjs",
35-
"module": "dist/index.js",
36-
"types": "dist/index.d.ts",
38+
"main": "./dist/index.js",
39+
"module": "./dist/index.js",
40+
"types": "./dist/index.d.ts",
3741
"files": ["dist"],
3842
"scripts": {
39-
"build": "tsup && pnpm build-pkg",
43+
"build": "tsdown && pnpm build-pkg",
4044
"build-pkg": "pnpm -r --filter='./packages/*' run build",
4145
"cleanup": "soy cleanup",
4246
"commit": "soy git-commit",
@@ -60,18 +64,18 @@
6064
"execa": "9.6.0",
6165
"kolorist": "1.8.0",
6266
"npm-check-updates": "18.0.1",
63-
"rimraf": "6.0.1"
67+
"rimraf": "6.0.1",
68+
"tinyglobby": "0.2.14"
6469
},
6570
"devDependencies": {
6671
"@soybeanjs/cli": "link:",
6772
"@soybeanjs/eslint-config": "1.6.1",
6873
"@types/node": "22.15.30",
6974
"eslint": "9.28.0",
7075
"eslint-plugin-vue": "10.2.0",
71-
"fast-glob": "3.3.3",
7276
"lint-staged": "16.1.0",
7377
"simple-git-hooks": "2.13.0",
74-
"tsup": "8.5.0",
78+
"tsdown": "0.12.9",
7579
"tsx": "4.19.4",
7680
"typescript": "5.8.3",
7781
"vue-eslint-parser": "10.1.3"

packages/create-soybean/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
"url": "https://github.com/soybeanjs/cli/issues"
1818
},
1919
"publishConfig": {
20-
"registry": "https://registry.npmjs.org/"
20+
"registry": "https://registry.npmjs.org/",
21+
"bin": {
22+
"create-soybean": "dist/index.js",
23+
"create-soy": "dist/index.js"
24+
}
2125
},
2226
"bin": {
2327
"create-soybean": "dist/index.js",
@@ -26,7 +30,7 @@
2630
"files": ["dist", "template-*"],
2731
"scripts": {
2832
"build": "pnpm typecheck && pnpm build-only",
29-
"build-only": "tsup",
33+
"build-only": "tsdown",
3034
"publish-pkg": "pnpm publish --access public --no-git-checks",
3135
"typecheck": "tsc --noEmit --skipLibCheck"
3236
},
@@ -39,7 +43,7 @@
3943
"devDependencies": {
4044
"@types/minimist": "1.2.5",
4145
"@types/prompts": "2.4.9",
42-
"tsup": "8.5.0",
46+
"tsdown": "0.12.9",
4347
"typescript": "5.8.3"
4448
}
4549
}

packages/create-soybean/src/bin.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { require } from 'tsx/cjs/api';
2+
3+
require('./index.ts', import.meta.url);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from 'tsdown';
2+
3+
export default defineConfig({
4+
entry: ['src/index.ts'],
5+
platform: 'node',
6+
clean: true,
7+
sourcemap: false,
8+
minify: false
9+
});

packages/create-soybean/tsup.config.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)