Giter Club home page Giter Club logo

rad's Introduction

rad 💯

A general purpose build tool. Concise, statically typed, batteries included. Command tasks, function tasks, and make-style tasks supported.

Jump to:

  1. Documentation site
  2. Usage
  3. Install
  4. What
  5. Why not <my-favorite-build-tool>?
  6. Manual
branch status
main main
next next

Usage

Rad is generally used as a CLI:

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

For example, $ rad build or $ rad --log-level=info test!

It can be used as a library too :).

Rad always consumes a rad.ts file, such as the one shown here:

// rad.ts
import { Task, Tasks } from "https://deno.land/x/[email protected]/src/mod.ts";

// command/shell tasks
const format = `prettier --write`;
const test = `deno test`;

// function tasks
const compile: Task = {
  dependsOn: [format],
  fn: ({ sh, ...toolkit }) => sh("tsc"),
};
const greet = {
  fn: () => Deno.writeTextFile("/tmp/hello", "world"),
};

// make-style tasks
const transpile: Task = {
  target: "phony",
  prereqs: ["prereq1", "prereq2"],
  async onMake({ logger }, { changedPrereqs /*, prereqs */ }) {
    for await (const req of changedPrereqs) {
      logger.info(`req: ${req.path} ${req.isFile}`);
    }
  },
};

export const tasks: Tasks = {
  compile,
  format,
  greet,
  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 --unstable -f -A -n rad https://raw.githubusercontent.com/cdaringe/rad/v6.7.0/src/bin.ts
cli docker docker pull cdaringe/rad 1
cli curl curl -fsSL https://raw.githubusercontent.com/cdaringe/rad/v6.7.0/assets/install.sh | sh (versioned)
curl -fsSL https://raw.githubusercontent.com/cdaringe/rad/main/assets/install.sh | sh (latest)
library deno import * as rad from https://github.com/cdaringe/rad/blob/main/v6.7.0/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 --log-level info "$@";
}

What is it

A build tool! It competes with make, npm-scripts, velociraptor, bazel, gradle, ant, gulp, or any of the other many tools out there! On various metrics, rad is subjectively better than some of the outstanding tools out there, and in some cases, not-so-much. We invite you to understand some of its core characteristics and interfaces.

rad offers:

  • simple, programmable task interfaces
  • easy to understand, declarative build steps
  • type-checked tasks
  • no quirky DSLs (make, gradle, and friends 😢). your build is code, not an arbitrary language or stringly (read: bummerly) typed script runner.
  • productive toolkit API for nuanced tasks that benefit from programming. 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
  • debug-ability. 🐛 inspect your data, tasks, or even rad itself
  • employs a real scripting language--not bash/sh! shell languages are great for running other programs, not for plumbing data

See why not <my-favorite-build-tool>?

Read more on our documentation site

rad's People

Contributors

cdaringe avatar renovate-bot avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

type-driven

rad's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot 📦🚀

ui report

  • bundle logs
  • show DAG
  • show data about ins and outs

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The release 6.2.1 on branch main cannot be published as it is out of range.

Based on the releases published on other branches, only versions within the range >=6.2.0 <6.2.1 can be published from branch main.

The following commits are responsible for the invalid release:

  • fix: checkin fixed sem-rel patched readme (d7bfc81)
  • chore: add patch logging (7d10f8a)

Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch main with git revert or git reset.

A valid branch could be next.

See the workflow configuration documentation for more details.


Good luck with your project ✨

Your semantic-release bot 📦🚀

>.sh | sh` |

rad/readme.md

Lines 54 to 57 in 0da5d07

| cli | `curl+sh` | `curl <todo>.sh | sh` |
| library | `deno` | `import * as rad from https://github.com/cdaringe/rad/blob/master/src/mod.ts` |


This issue was generated by todo based on a todo comment in 0da5d07. It's been assigned to @cdaringe because they committed the code.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

support make target/prereq file parity

problem

in/a.src.js
in/b.src.js

we want make style target matches to build

out/a.js
out/b.js

maybe something that matches on basename?

if input/prereq/match/a.js => symbol prereq/match/a test for output/prereq/match? maybe add a ioMap: fn to let users explain it, otherwise assume single target?

write toolkit docs-->

rad/readme.md

Lines 88 to 93 in 9e95680

- productive toolkit API for nuanced tasks that benefit from progamming. see [toolkit](#toolkit)<!-- @todo write toolkit docs-->
- bottom-up, `make`-style build targets
- fast builds, skip redundant work when inputs haven't changed
- cli mode, or library mode
- portable. 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


This issue was generated by todo based on a todo comment in 9e95680. It's been assigned to @cdaringe because they committed the code.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Warning

Renovate failed to look up the following dependencies: Could not determine new digest for update (cdnjs package prism/plugins/toolbar/prism-toolbar.min.css), Could not determine new digest for update (cdnjs package prism/plugins/toolbar/prism-toolbar.min.js), Could not determine new digest for update (cdnjs package prism/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js), Could not determine new digest for update (cdnjs package prism/plugins/autoloader/prism-autoloader.min.js).

Files affected: assets/site/index.html


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
Dockerfile
github-actions
.github/workflows/main.yml
  • actions/checkout v3
  • actions/setup-node v3
  • peaceiris/actions-gh-pages v3
.github/workflows/next.yml
  • actions/checkout v3
  • actions/setup-node v3
.github/workflows/pull_request.yml
  • actions/checkout v3
html
assets/site/index.html
  • prism 1.29.0@sha512-mIs9kKbaw6JZFfSuo+MovjU+Ntggfoj8RwAmJbVXQ5mkAX5LlgETQEweFPI18humSPHymTb5iikEOKWF7I8ncQ==
  • prism 1.29.0@sha512-Dqf5696xtofgH089BgZJo2lSWTvev4GFo+gA2o4GullFY65rzQVQLQVlzLvYwTo0Bb2Gpb6IqwxYWtoMonfdhQ==
  • prism 1.29.0@sha512-4ZmAB2UXPu3Rgy5ZClpqnJ/zXXZBdulFXY1eWMLgIjp2HWgkHGIpr1b7kmCK+rdD5NYfivTp47UR+bQ4oTBllQ==
  • prism 1.29.0@sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==
  • prism 1.29.0@sha512-st608h+ZqzliahyzEpETxzU0f7z7a9acN6AFvYmHvpFhmcFuKT8a22TT5TpKpjDa3pt3Wv7Z3SdQBCBdDPhyWA==
  • prism 1.29.0@sha512-/kVH1uXuObC0iYgxxCKY41JdWOkKOxorFVmip+YVifKsJ4Au/87EisD1wty7vxN2kAhnWh6Yc8o/dSAXj6Oz7A==
  • prism 1.29.0@sha512-d1t+YumgzdIHUL78me4B9NzNTu9Lcj6RdGVbdiFDlxRV9JTN9s+iBQRhUqLRq5xtWUp1AD+cW2sN2OlST716fw==
  • prism 1.29.0@sha512-h92O152CCXt3xEUWDYTGLz58u+IOpZU8Z2MEkkBsXsRlAhckPFeEolarVn7tOhTVbjsJPpyknL0CFUrc2rlgPQ==
  • prism 1.29.0@sha512-SkmBfuA2hqjzEVpmnMt/LINrjop3GKWqsuLSSB3e7iBmYK7JuWw4ldmmxwD9mdm2IRTTi0OxSAfEGvgEi0i2Kw==

  • Check this box to trigger a request for Renovate to run again on this repository

move to debug level

rad/src/Task.ts

Lines 173 to 178 in e25f8b4

toolkit.logger.debug( // @todo move to debug level
`mapPrereqToTarget: ${walkEntry.path} => ${targetPath}`,
);
}
const isPrereqChanged = (Number(modified) || Number(created) || 0) >=
await getModifiedTimeOrVeryOld(targetPath);


This issue was generated by todo based on a todo comment in e25f8b4. It's been assigned to @cdaringe because they committed the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.