37 GB
4,042,753 files
Updated about 1 month ago
Name
Size
src
tests
CHANGELOG.md1.83 kB
xet
README.md2.86 kB
xet
deno.json362 Bytes
xet
mod.ts490 Bytes
xet
README.md

@zuke/turbo

Typed Turborepo CLI task wrappers for Zuke builds — run and prune.

import { TurboTasks } from "@zuke/turbo";

await TurboTasks.run((s) => s.tasks("build", "test").filter("web").parallel());
await TurboTasks.prune((s) => s.package("web").docker().outDir("out"));

API

Full typed API — generated from deno doc
`@zuke/turbo` — typed `TurboTasks` wrappers for the
Turborepo (https://turbo.build) CLI, for use in Zuke builds.

```ts
import { TurboTasks } from "@zuke/turbo";

await TurboTasks.run((s) => s.tasks("build", "test").filter("web"));
```
@module

const TurboTasks: TurboTasksApi
  Typed task functions for the `turbo` CLI.

class TurboPruneSettings extends TurboSettings
  Settings for `turbo prune`.

  package(name: string): this
    The package to prune the workspace down to (required).
  docker(): this
    Produce a Docker-friendly layout (`--docker`).
  outDir(path: PathLike): this
    Output directory (`--out-dir`).
  override protected buildArgs(): string[]
    Assemble the `turbo prune` argv.

class TurboRunSettings extends TurboSettings
  Settings for `turbo run`.

  tasks(...names: string[]): this
    The package.json task(s) to run (positional; at least one required).
  filter(pattern: string): this
    Restrict to matching packages (`--filter`); repeatable.
  parallel(): this
    Run tasks in parallel, ignoring dependencies (`--parallel`).
  concurrency(value: string): this
    Limit concurrency, e.g. `10` or `50%` (`--concurrency`).
  force(): this
    Ignore cache hits and force execution (`--force`).
  noCache(): this
    Disable reading and writing the cache (`--no-cache`).
  continue(): this
    Continue running tasks even after one fails (`--continue`).
  dryRun(): this
    List what would run without executing (`--dry-run`).
  outputLogs(mode: string): this
    Output-log mode, e.g. `full`, `hash-only`, `errors-only` (`--output-logs`).
  override protected buildArgs(): string[]
    Assemble the `turbo run` argv.

abstract class TurboSettings extends ToolSettings
  Base for all `turbo` subcommand settings: the binary is `turbo`.

  override protected defaultTool(): string
    The tool binary this settings class invokes: `turbo`.
  override protected defaultResolution(): ToolResolution
    Resolve the binary from `node_modules/.bin` by default — turbo is an npm-distributed tool.

interface TurboTasksApi
  The shape of {@link TurboTasks}.

  run(configure?: Configure<TurboRunSettings>): Promise<CommandOutput>
    Run workspace tasks: `turbo run`.
  prune(configure?: Configure<TurboPruneSettings>): Promise<CommandOutput>
    Prune the workspace to a package: `turbo prune`.
Total size
37 GB
Files
4,042,753
Last updated
Oct 24
Pre-warmed CDN
US EU US EU

Contributors