Add tasks.json to frontend
This commit is contained in:
parent
7a7f76c41a
commit
096f725a20
2 changed files with 17 additions and 0 deletions
1
frontend/public/tasks.json
Symbolic link
1
frontend/public/tasks.json
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../tasks.json
|
16
frontend/src/task-loader.ts
Normal file
16
frontend/src/task-loader.ts
Normal file
|
@ -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()
|
||||
}
|
Reference in a new issue