Replace tsup with tsdown, add shebang for CLI

This commit is contained in:
Aman Varshney
2025-04-28 04:36:43 +05:30
parent 5ce1c9a28c
commit 49f1fa135f
5 changed files with 198 additions and 213 deletions

View File

@@ -45,8 +45,8 @@
},
"homepage": "https://better-t-stack.amanv.dev/",
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"build": "tsdown",
"dev": "tsdown --watch",
"check-types": "tsc --noEmit",
"check": "biome check --write .",
"test": "vitest run",
@@ -68,7 +68,7 @@
"@types/globby": "^9.1.0",
"@types/node": "^22.14.1",
"@types/yargs": "^17.0.33",
"tsup": "^8.4.0",
"tsdown": "^0.9.9",
"typescript": "^5.8.3"
}
}

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env node
import path from "node:path";
import { cancel, intro, log, outro } from "@clack/prompts";
import { consola } from "consola";

View File

@@ -1,15 +1,10 @@
import { defineConfig } from "tsup";
import { defineConfig } from "tsdown";
export default defineConfig({
entry: ["src/index.ts"],
format: ["esm"],
clean: true,
dts: true,
shims: true,
minify: true,
splitting: false,
outDir: "dist",
banner: {
js: "#!/usr/bin/env node",
},
});