task-graph
v0.0.1-dev
Published
Execute tasks in parallel in topological order
Downloads
3
Readme
task-graph
Execute tasks in parallel in topological order
Installation
yarn add task-graph
Usage
import { TaskManifestEntry, TaskGraph } from 'task-graph'
const manifest: TaskManifestEntry<any>[] = [
{
name: "task1",
dependencies: [],
},
{
name: "task2",
dependencies: [],
},
{
name: "task3",
dependencies: ["task1"],
},
{
name: "task4",
dependencies: ["task2", "task3"],
},
{
name: "task5",
dependencies: ["task4"],
},
{
name: "task6",
dependencies: ["task1"],
},
{
name: "task7",
dependencies: ["task2", "task4"],
},
]
const graph = new TaskGraph(manifest)
await graph.run()