Skip to main content
Works with
This package works with Bun
This package works with Node.js
This package works with Deno
JSR Score
94%
Published
2 weeks ago (0.3.2)

Shake

A simple task runner/ dependency resolver for JavaScript.

Usage

import $ from 'jsr:@david/dax';
import { FileTask, Task, run, watch } from 'jsr:@tani/shake';

// File task will be run only if the file is missing or older than the dependencies
const hello = new FileTask("hello.out", [new FileTask("hello.c")], async () => {
  await $`gcc -o hello.out hello.c`;
});


// Task always will be run when it is called
const greet = new Task([hello], async () => {
  await $`./hello.out`;
});

// Run the task once
run(greet);

// Watch the task
// This will run the task when the file is changed
watch(".", greet);

License

MIT License

Copyright (c) 2024, Masaya Taniguchi

Add Package

deno add @tani/shake

Import symbol

import * as mod from "@tani/shake";

Add Package

npx jsr add @tani/shake

Import symbol

import * as mod from "@tani/shake";

Add Package

yarn dlx jsr add @tani/shake

Import symbol

import * as mod from "@tani/shake";

Add Package

pnpm dlx jsr add @tani/shake

Import symbol

import * as mod from "@tani/shake";

Add Package

bunx jsr add @tani/shake

Import symbol

import * as mod from "@tani/shake";