@zuke/tsup

← API reference

`@zuke/tsup` — a typed `TsupTasks` wrapper for the

Symbols

# TsupBuildSettings class
class TsupBuildSettings extends ToolSettings

Settings for a tsup bundle run.

MemberSignatureDoc
entry entry(...paths: PathLike[]): this Entry point(s) to bundle (positional); repeatable.
format format(...formats: TsupFormat[]): this Output format(s), joined into --format (e.g. esm,cjs).
dts dts(): this Emit TypeScript declaration files (--dts).
minify minify(): this Minify the output (--minify).
sourcemap sourcemap(): this Emit source maps (--sourcemap).
clean clean(): this Clean the output directory before building (--clean).
watch watch(): this Rebuild on change (--watch).
outDir outDir(path: PathLike): this Output directory (--out-dir).
target target(value: string): this Compilation target, e.g. es2022 or node18 (--target).
tsconfig tsconfig(path: PathLike): this Path to a tsconfig file (--tsconfig).
config config(path: PathLike): this Path to a tsup config file (--config).
# TsupFormat type
type TsupFormat = esm | cjs | iife

An output format accepted by tsup's --format.

# TsupTasks const
const TsupTasks: TsupTasksApi

Typed task functions for the tsup bundler.

# TsupTasksApi interface
interface TsupTasksApi

The shape of TsupTasks.

MemberSignatureDoc
build build(configure?: Configure<TsupBuildSettings>): Promise<CommandOutput> Bundle the entry points: tsup.