trantran
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

trantran

🚀 A simple task executor


const context: Context = {
  /*...*/
}; // Whatever you want to provide to your tasks!

const bendSpoon = new Task<Context>({
  name: "bending-spoon",
  run: (context: Context) => {
    /*...*/
  },
});

const spinTheWheel = new Task<Context>({
  name: "spin-the-wheel",
  run: async (context: Context) => {
    /*...*/
  },
});

const doTheMagic = new Task<Context>({
  name: "do-the-magic",
  dependencies: [bendSpoon, spinTheWheel],
});

const runner = new Runner(context);
await runner.runTasks(doTheMagic);

Package Sidebar

Install

npm i trantran

Weekly Downloads

0

Version

0.0.4

License

ISC

Unpacked Size

15.7 kB

Total Files

24

Last publish

Collaborators

  • corradodellorusso