Browse Source

Add tasks.json to frontend

mj-deploy
Standa Lukeš 4 years ago
parent
commit
096f725a20
  1. 1
      frontend/public/tasks.json
  2. 16
      frontend/src/task-loader.ts

1
frontend/public/tasks.json

@ -0,0 +1 @@
../../tasks.json

16
frontend/src/task-loader.ts

@ -0,0 +1,16 @@
export type TaskDescriptor = {
id: string
requires: []
comment?: string
}
export type TasksFile = {
tasks: TaskDescriptor[]
clusters: { [name: string]: string[] }
}
export async function loadTasks(): Promise<TasksFile> {
const r = await fetch("/tasks.json")
return await r.json()
}