zuke.tools.tsup

← Python API reference

@zuke/tsup 1.0.1: @zuke/tsup — a typed TsupTasks wrapper for the [tsup](https://tsup.egoist.dev) bundler, for use in Zuke builds.

Symbols

#

TsupBuildSettings

class
class TsupBuildSettings(ToolSettings)

Settings for a tsup bundle run.

  • entry(*paths: str) -> Self

    Entry point(s) to bundle (positional); repeatable.

  • format(*formats: Literal['esm', 'cjs', 'iife']) -> Self

    Output format(s), joined into --format (e.g. esm,cjs).

  • dts() -> Self

    Emit TypeScript declaration files (--dts).

  • minify() -> Self

    Minify the output (--minify).

  • sourcemap() -> Self

    Emit source maps (--sourcemap).

  • clean() -> Self

    Clean the output directory before building (--clean).

  • watch() -> Self

    Rebuild on change (--watch).

  • out_dir(path: str) -> Self

    Output directory (--out-dir).

  • target(value: str) -> Self

    Compilation target, e.g. es2022 or node18 (--target).

  • tsconfig(path: str) -> Self

    Path to a tsconfig file (--tsconfig).

  • config(path: str) -> Self

    Path to a tsup config file (--config).

#

TsupTasks

class
class TsupTasks

Typed task functions for the tsup bundler.

  • static async build(ctx: ServiceContext, configure: Callable[[TsupBuildSettings], TsupBuildSettings] | None=None) -> ExecResult

    Bundle the entry points: tsup.