rad 💯

a general purpose build tool.

usage

$ rad <task-name> [--help]

// rad.ts - your buildfile
const format = `prettier --write`
const test = `deno test`
const build = {
  dependsOn: [format],
  fn({ sh }) => sh('tsc')
}
export const tasks = {
  build,
  format,
  test
}

install

there are a few formal ways to use rad:

usage method steps
cli deno deno install rad https://github.com/cdaringe/rad/blob/master/src/bin.ts
docker docker docker pull cdaringe/rad 1
library deno import * as rad from https://github.com/cdaringe/rad/blob/master/src/mod.ts

1For docker users, consider making a nice shell alias

# shell profile, e.g. .bash_profile
function rad() {
  docker run --rm -v <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>P</mi><mi>W</mi><mi>D</mi><mo>:</mo><mi mathvariant="normal">/</mi><mi>r</mi><mi>a</mi><mi>d</mi><mi>c</mi><mi>d</mi><mi>a</mi><mi>r</mi><mi>i</mi><mi>n</mi><mi>g</mi><mi>e</mi><mi mathvariant="normal">/</mi><mi>r</mi><mi>a</mi><mi>d</mi><mi mathvariant="normal">&quot;</mi></mrow><annotation encoding="application/x-tex">PWD:/rad cdaringe/rad &quot;</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em;"></span><span class="mord mathnormal" style="margin-right:0.13889em;">P</span><span class="mord mathnormal" style="margin-right:0.13889em;">W</span><span class="mord mathnormal" style="margin-right:0.02778em;">D</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">:</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord">/</span><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="mord mathnormal">a</span><span class="mord mathnormal">d</span><span class="mord mathnormal">c</span><span class="mord mathnormal">d</span><span class="mord mathnormal">a</span><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="mord mathnormal">in</span><span class="mord mathnormal" style="margin-right:0.03588em;">g</span><span class="mord mathnormal">e</span><span class="mord">/</span><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="mord mathnormal">a</span><span class="mord mathnormal">d</span><span class="mord">&quot;</span></span></span></span>@";
}

what is it

  • bottom-up, make-style build targets
    • fast builds, skip redundant tasks when inputs haven’t changed!
  • pipeline style builds
    • easy to understand, declarative build steps
  • highly portable. build automation for any language or project, in many environments
  • generic package management
  • great UX is priority 1 (after priorities 0.33 works, 0.66 correct, & 0.99 fast-enough :))

why

no build tools in 2018 2019 2020 have a complete feature set that the average polyglot programmer needs without coercing it or piling on extraneous complexity.

see why not just use

features

  • stop using make and bash. use a modern syntax and a real scripting language
    • <ref to why bash is not fit for general purpose scripting>
  • no DSL. your build is code–tasks are POJOs with a verified interface
  • debuggable. 🐛 halt the runtime, inspect your data, tasks, or even rad itself
  • beautiful.
  • take it anywhere.
    • osx, linux, windows!
      • help us support other architectures
  • no dependencies.
    • e.g. you don’t need bash, or java, this lib, that lib, etc. we bundle everything we need, courtesy of deno bundle!