Skip to content

Commit 43bd233

Browse files
committed
support reset command
Signed-off-by: shmck <[email protected]>
1 parent 97aabcd commit 43bd233

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

Diff for: src/schema/skeleton.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,18 @@ export default {
8080
additionalProperties: false,
8181
required: ["uri", "branch"],
8282
},
83-
83+
reset: {
84+
type: "object",
85+
description: "Configuration options for resetting a tutorial",
86+
properties: {
87+
command: {
88+
type: "string",
89+
description: "An optional command to run on reset",
90+
examples: ["npm install"],
91+
},
92+
},
93+
additionalProperties: false,
94+
},
8495
dependencies: {
8596
type: "array",
8697
description: "A list of tutorial dependencies",

Diff for: src/schema/tutorial.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,18 @@ export default {
9999
additionalProperties: false,
100100
required: ["uri", "branch"],
101101
},
102-
102+
reset: {
103+
type: "object",
104+
description: "Configuration options for resetting a tutorial",
105+
properties: {
106+
command: {
107+
type: "string",
108+
description: "An optional command to run on reset",
109+
examples: ["npm install"],
110+
},
111+
},
112+
additionalProperties: false,
113+
},
103114
dependencies: {
104115
type: "array",
105116
description: "A list of tutorial dependencies",

Diff for: tests/parse.test.ts

+6
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,9 @@ Description.
998998
uri: "https://path.to/repo",
999999
branch: "aBranch",
10001000
},
1001+
reset: {
1002+
command: "some command",
1003+
},
10011004
dependencies: [
10021005
{
10031006
name: "node",
@@ -1031,6 +1034,9 @@ Description.
10311034
uri: "https://path.to/repo",
10321035
branch: "aBranch",
10331036
},
1037+
reset: {
1038+
command: "some command",
1039+
},
10341040
dependencies: [
10351041
{
10361042
name: "node",

Diff for: typings/tutorial.d.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
export type Maybe<T> = T | null;
22

3+
export type ConfigReset = {
4+
command?: string;
5+
};
6+
37
export type TutorialConfig = {
4-
appVersions: TutorialAppVersions;
8+
appVersions?: TutorialAppVersions;
59
testRunner: TestRunnerConfig;
610
repo: TutorialRepo;
711
dependencies?: TutorialDependency[];
12+
reset?: ConfigReset;
813
};
914

1015
/** Logical groupings of tasks */

0 commit comments

Comments
 (0)