general purpose build tool. statically typed, batteries included. command, function, and make-style tasks supported.
Repository
Current version released
4 years ago
Versions
- v8.0.1Latest
- v8.0.0
- v7.0.0
- v6.11.0
- v6.10.0
- v6.9.1
- v6.9.0
- v6.8.0
- v6.7.1
- v6.7.0
- v6.6.0
- v6.5.0
- v6.4.0
- v6.3.6
- v6.3.5
- v6.3.4
- v6.3.3-next.1
- v6.3.3
- v6.3.2
- v6.3.2-next.1
- v6.3.1
- v6.3.0
- v6.3.0-next.3
- v6.3.0-next.2
- v6.3.0-next.1
- v6.2.2
- v6.2.2-next.1
- v6.2.1
- v6.2.0
- v6.1.1
- v6.1.0
- v6.0.0
- v5.0.0
- v4.1.1
- v4.1.0
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.0.1
- v3.0.0
- v2.0.1
- v2.0.0
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
rad 💯
a general purpose build tool.
statically typed, batteries included. command tasks, function tasks, and make-style tasks supported.
branch | status |
---|---|
master | |
next |
jump to:
usage
$ rad <task-name> [--help]
// rad.ts
import { Tasks } from "https://deno.land/x/rad/src/mod.ts";
// command tasks
const format = `prettier --write`
const test = `deno test`
// function tasks
const compile = {
dependsOn: [format],
fn({ sh, ...toolkit }) => sh('tsc')
}
// make-style tasks
const transpile = {
target: "phony",
prereqs: ["p1", "p2"],
async onMake({ logger }, { changedPrereqs /*, prereqs */}) {
for await (const req of changedPrereqs) {
logger.info(`req: ${req.filename} ${JSON.stringify(req.info)}`);
}
},
}
export const tasks: Tasks = {
compile,
format,
test
}
install
there are a few formal ways to use rad
. regardless of the route you choose,
know that all strategies support using pinned versions, adherent to semver.
see the releases page.
usage | install-method | install-steps |
---|---|---|
cli | deno |
deno install rad https://github.com/cdaringe/rad/blob/master/src/bin.ts |
cli | docker |
docker pull cdaringe/rad 1 |
cli | curl |
curl -fsSL https://github.com/cdaringe/rad/releases/download/v1.2.0/install.sh | sh (versioned)curl -fsSL https://raw.githubusercontent.com/cdaringe/rad/master/assets/install.sh | sh (latest) |
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 $PWD:/rad cdaringe/rad "$@";
}
what is it
a build tool! it competes with make, npm-scripts, bazel, gradle, ant, gulp, or any of the other many tools out there!
rad
offers:
- simple, programmable task interfaces
- easy to understand, declarative build steps
- type-checked tasks
- productive toolkit API for nuanced tasks that benefit from progamming. see toolkit
- bottom-up,
make
-style build targets- fast builds, skip redundant work when inputs haven’t changed
- cli mode, or library mode
- portability. build automation for any language or project, in many environments (*limited to Deno target architectures, for the time being. long term, we may package this in
Rust
) - great UX
- no quirky DSLs (
make
,gradle
, and friends 😢). your build is code–tasks are typescript & are indeed type-checked! - debuggability. 🐛 inspect your data, tasks, or even rad itself
- a real scripting language–not
bash/sh
! shell languages are great for running other programs, not for plumbing data