Skip to content

Commit 06b8eca

Browse files
authoredJan 19, 2022
Merge pull request #94 from moT01/feat/add-support-for-continue-config
feat: add support for continue config
2 parents 49dd035 + dbb1a67 commit 06b8eca

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed
 

‎src/schema/skeleton.ts

+18
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,19 @@ export default {
9797
additionalProperties: false,
9898
required: ["uri", "branch"],
9999
},
100+
continue: {
101+
type: "object",
102+
description: "Configuration options for continuing a tutorial",
103+
properties: {
104+
commands: {
105+
$ref: "#/definitions/command_array",
106+
},
107+
vscodeCommands: {
108+
$ref: "#/definitions/vscode_command_array",
109+
},
110+
},
111+
additionalProperties: false,
112+
},
100113
reset: {
101114
type: "object",
102115
description: "Configuration options for resetting a tutorial",
@@ -164,6 +177,11 @@ export default {
164177
description:
165178
"An event triggered on tutorial startup. Sends tutorialId",
166179
},
180+
continue: {
181+
type: "boolean",
182+
description:
183+
"An event triggered when continuing a tutorial. Sends tutorialId",
184+
},
167185
reset: {
168186
type: "boolean",
169187
description:

‎src/schema/tutorial.ts

+19-1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ export default {
116116
additionalProperties: false,
117117
required: ["uri", "branch"],
118118
},
119+
continue: {
120+
type: "object",
121+
description: "Configuration options for continuing a tutorial",
122+
properties: {
123+
commands: {
124+
$ref: "#/definitions/command_array",
125+
},
126+
vscodeCommands: {
127+
$ref: "#/definitions/vscode_command_array",
128+
},
129+
},
130+
additionalProperties: false,
131+
},
119132
reset: {
120133
type: "object",
121134
description: "Configuration options for resetting a tutorial",
@@ -183,6 +196,11 @@ export default {
183196
description:
184197
"An event triggered on tutorial startup. Sends tutorialId",
185198
},
199+
continue: {
200+
type: "boolean",
201+
description:
202+
"An event triggered when continuing a tutorial. Sends tutorialId",
203+
},
186204
reset: {
187205
type: "boolean",
188206
description:
@@ -298,5 +316,5 @@ export default {
298316
},
299317
},
300318
additionalProperties: false,
301-
required: ["version", "summary", "config", "levels"],
319+
required: ["id", "version", "summary", "config", "levels"],
302320
};

‎src/utils/parse.ts

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export function parse (params: ParseParams): any {
144144
const mdContent: TutorialFrame = parseMdContent(params.text + '\n\n')
145145

146146
const parsed: Partial<T.Tutorial> = {
147+
id: params.skeleton.id,
147148
version: params.skeleton.version,
148149
summary: mdContent.summary,
149150
config: params.skeleton.config || {},

0 commit comments

Comments
 (0)
Please sign in to comment.