@zuke/tsx
`@zuke/tsx` — typed `tsx` task wrappers for Zuke builds.
@zuke/tsx on JSR ↗ 5 symbols
Symbols
class TsxCommonSettings extends ToolSettings Options shared by every tsx invocation: the entry point and how to load it.
| Member | Signature | Doc |
|---|---|---|
script | script(path: PathLike): this | The entry point to execute (required). |
scriptArgs | scriptArgs(...args: Array<string | number>): this | Arguments passed to the script (after the entry point). |
tsconfig | tsconfig(path: PathLike): this | Use an explicit tsconfig.json (--tsconfig). |
envFile | envFile(path: PathLike): this | Load environment variables from a file (--env-file). |
noCache | noCache(): this | Disable the file-system transpile cache (--no-cache). |
noWarnings | noWarnings(): this | Suppress Node warnings (--no-warnings). |
conditions | conditions(...names: string[]): this | Custom export conditions to resolve (--conditions); repeatable. |
importModule | importModule(...modules: string[]): this | Preload a module before the entry point (--import); repeatable. |
class TsxSettings extends TsxCommonSettings Settings for tsx <file>.
const TsxTasks: TsxTasksApi Typed task functions for the tsx TypeScript runner.
interface TsxTasksApi The shape of TsxTasks.
| Member | Signature | Doc |
|---|---|---|
tsx | tsx(configure?: Configure<TsxSettings>): Promise<CommandOutput> | Run a TypeScript entry point: tsx <file>. |
watch | watch(configure?: Configure<TsxWatchSettings>): Promise<CommandOutput> | Re-run an entry point on changes: tsx watch <file>. |
class TsxWatchSettings extends TsxCommonSettings Settings for tsx watch <file>.
| Member | Signature | Doc |
|---|---|---|
noClearScreen | noClearScreen(): this | Keep prior output between reruns (--clear-screen=false). |
include | include(...paths: PathLike[]): this | Additional paths to watch (--include); repeatable. |
exclude | exclude(...paths: PathLike[]): this | Paths to ignore while watching (--exclude); repeatable. |