0.0.4 ā€¢ Published 1 year ago

trantran v0.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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);
0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago