-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtsup.config.ts
More file actions
29 lines (27 loc) · 888 Bytes
/
tsup.config.ts
File metadata and controls
29 lines (27 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { readFileSync } from "node:fs";
import { defineConfig } from "tsup";
const pkg = JSON.parse(readFileSync("./package.json", "utf8"));
export default defineConfig({
entry: {
"core/index": "src/core/index.ts",
"repo/index": "src/repo/index.ts",
"discovery/index": "src/discovery/index.ts",
"budget/index": "src/budget/index.ts",
"execution/index": "src/execution/index.ts",
"completion/index": "src/completion/index.ts",
"tracking/index": "src/tracking/index.ts",
"cli/index": "src/cli/index.ts",
"cli/cli": "src/cli/cli.ts",
"dashboard/index": "src/dashboard/index.ts",
},
format: ["esm"],
dts: true,
clean: true,
sourcemap: true,
target: "node24",
define: {
__OAC_VERSION__: JSON.stringify(pkg.version),
},
banner: ({ entryPoint }) =>
entryPoint === "src/cli/index.ts" ? { js: "#!/usr/bin/env node" } : {},
});