-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathkatacodaTools.ts
32 lines (31 loc) · 1.16 KB
/
katacodaTools.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { KatacodaStep, KatacodaAsset } from "./katacodaInterfaces";
export class KatacodaTools {
public static generateIndexJson(title: string, description: string, minutes: number, steps: KatacodaStep[], assets: KatacodaAsset[], showVsCodeIde: boolean) {
let environment = showVsCodeIde ? { "uilayout": "terminal", "showide": true } : { "uilayout": "editor-terminal", "showide": false };
let indexJsonObject = {
"title": title,
"description": description,
"difficulty": "Beginner",
"time": minutes + " Minutes",
"details": {
"steps": steps,
"intro": {
"text": "intro.md",
"code": "intro_foreground.sh",
"courseData": "intro_background.sh"
},
"finish": {
"text": "finish.md"
},
"assets": {
"client": assets
}
},
"environment": environment,
"backend": {
"imageid": "ubuntu:2004"
}
}
return indexJsonObject;
}
}