@theholocron/tsdown-config
v7.19.1
Published
Shared tsdown configurations for @theholocron packages.
Maintainers
Readme
tsdown Config
Shared tsdown configurations for @theholocron packages.
Installation
pnpm add -D @theholocron/tsdown-config tsdownPresets
library — published ESM library
Single entry point (src/index.ts), generates .d.ts type declarations, does not bundle @theholocron/* peers.
// tsdown.config.ts
export { default } from "@theholocron/tsdown-config/presets/library";To customise entry points or other options, use the library() factory:
// tsdown.config.ts
import { library } from "@theholocron/tsdown-config/presets/library";
export default library({
entry: ["src/index.ts", "src/capabilities/index.ts"],
});cli — CLI binary
Single entry point (src/cli.ts), no type declarations (binaries don't need them), sourcemap enabled, injects #!/usr/bin/env node shebang so the output is directly executable.
// tsdown.config.ts
export { default } from "@theholocron/tsdown-config/presets/cli";To customise the entry point or other options, use the cli() factory:
// tsdown.config.ts
import { cli } from "@theholocron/tsdown-config/presets/cli";
export default cli({
entry: ["src/my-cli.ts"],
});cli — CLI binary
Single entry point (src/cli.ts), no type declarations (binaries don't need them), sourcemap enabled, injects #!/usr/bin/env node shebang so the output is directly executable.
// tsdown.config.ts
export { default } from "@theholocron/tsdown-config/presets/cli";To customise the entry point or other options, use the cli() factory:
// tsdown.config.ts
import { cli } from "@theholocron/tsdown-config/presets/cli";
export default cli({
entry: ["src/my-cli.ts"],
});