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, programmable, transparent, batteries included. shell, function based, and make-style task support.
usage
$ rad <task-name> [--help]
// rad.ts - your buildfile
import { Tasks } from "https://raw.githubusercontent.com/cdaringe/rad/master/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 }, { prereqs, getChangedPrereqFilenames }) {
const babel = await import("https://my.cdn/babel/7.js")
for await (const req of prereqs) {
logger.info(`req: ${req.filename} ${JSON.stringify(req.info)}`);
}
const changed = await getChangedPrereqFilenames();
logger.info(`changed: ${changed} (${changed.length})`);
},
}
export const tasks: Tasks = {
compile,
format,
test
}
install
there are a few formal ways to use rad
:
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+sh |
`curl .sh |
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
- 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
andbash
. 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
- osx, linux, windows!
- 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
!
- e.g. you don’t need bash, or java, this lib, that lib, etc. we bundle everything we need,
courtesy of