@zuke/bun
`@zuke/bun` — typed `BunTasks` wrappers for the `bun` CLI, for use in Zuke
@zuke/bun on JSR ↗ 9 symbols
Symbols
class BunAddSettings extends BunSettings Settings for bun add.
| Member | Signature | Doc |
|---|---|---|
packages | packages(...specs: string[]): this | Package specs to add (required). |
dev | dev(): this | Add to devDependencies (--dev). |
optional | optional(): this | Add to optionalDependencies (--optional). |
exact | exact(): this | Pin the exact version (--exact). |
global | global(): this | Install globally (--global). |
class BunInstallSettings extends BunSettings Settings for bun install.
| Member | Signature | Doc |
|---|---|---|
production | production(): this | Install without devDependencies (--production). |
frozenLockfile | frozenLockfile(): this | Fail if the lockfile is out of date (--frozen-lockfile). |
class BunRemoveSettings extends BunSettings Settings for bun remove.
| Member | Signature | Doc |
|---|---|---|
packages | packages(...names: string[]): this | Package names to remove (required). |
class BunRunSettings extends BunSettings Settings for bun run.
| Member | Signature | Doc |
|---|---|---|
script | script(name: string): this | The package.json script to run (required). |
scriptArgs | scriptArgs(...args: Array<string | number>): this | Arguments forwarded to the script. |
class BunSettings extends ToolSettings Base for all bun subcommand settings: binary is bun from PATH.
const BunTasks: BunTasksApi Typed task functions for the bun CLI.
interface BunTasksApi The shape of BunTasks.
| Member | Signature | Doc |
|---|---|---|
install | install(configure?: Configure<BunInstallSettings>): Promise<CommandOutput> | Install dependencies: bun install. |
add | add(configure?: Configure<BunAddSettings>): Promise<CommandOutput> | Add dependencies: bun add. |
remove | remove(configure?: Configure<BunRemoveSettings>): Promise<CommandOutput> | Remove dependencies: bun remove. |
run | run(configure?: Configure<BunRunSettings>): Promise<CommandOutput> | Run a package.json script: bun run. |
x | x(configure?: Configure<BunXSettings>): Promise<CommandOutput> | Execute a package binary: bun x (bunx). |
test | test(configure?: Configure<BunTestSettings>): Promise<CommandOutput> | Run the test suite: bun test. |
class BunTestSettings extends BunSettings Settings for bun test.
| Member | Signature | Doc |
|---|---|---|
paths | paths(...patterns: string[]): this | Test file or directory patterns to run; omit to run all tests. |
coverage | coverage(): this | Collect coverage (--coverage). |
bail | bail(): this | Stop after the first failure (--bail). |
class BunXSettings extends BunSettings Settings for bun x (the bunx package runner).
| Member | Signature | Doc |
|---|---|---|
command | command(name: string): this | The package binary to execute (required). |
execArgs | execArgs(...args: Array<string | number>): this | Arguments forwarded to the command. |