File tree 8 files changed +32
-35
lines changed
8 files changed +32
-35
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,14 @@ export default {
52
52
description : "An optional folder for the test runner" ,
53
53
examples : [ "coderoad" ] ,
54
54
} ,
55
- setup : {
56
- $ref : "#/definitions/setup_action_without_commits" ,
57
- description :
58
- "Setup actions or commands used for setting up the test runner on tutorial launch" ,
59
- } ,
60
55
} ,
61
56
required : [ "command" , "args" ] ,
62
57
} ,
58
+ setup : {
59
+ $ref : "#/definitions/setup_action_without_commits" ,
60
+ description :
61
+ "Setup actions or commands used for setting up the test runner on tutorial launch" ,
62
+ } ,
63
63
repo : {
64
64
type : "object" ,
65
65
description : "The repo holding the git commits for the tutorial" ,
Original file line number Diff line number Diff line change @@ -71,14 +71,14 @@ export default {
71
71
description : "An optional folder for the test runner" ,
72
72
examples : [ "coderoad" ] ,
73
73
} ,
74
- setup : {
75
- $ref : "#/definitions/setup_action" ,
76
- description :
77
- "Setup commits or commands used for setting up the test runner on tutorial launch" ,
78
- } ,
79
74
} ,
80
75
required : [ "command" , "args" ] ,
81
76
} ,
77
+ setup : {
78
+ $ref : "#/definitions/setup_action" ,
79
+ description :
80
+ "Setup commits or commands used for setting up the test runner on tutorial launch" ,
81
+ } ,
82
82
repo : {
83
83
type : "object" ,
84
84
description : "The repo holding the git commits for the tutorial" ,
Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ export function parse(params: ParseParams): any {
153
153
// add init commits
154
154
if ( params . commits . INIT && params . commits . INIT . length ) {
155
155
// @ts -ignore
156
- parsed . config . testRunner . setup = {
157
- ...( parsed . config ?. testRunner ?. setup || { } ) ,
156
+ parsed . config . setup = {
157
+ ...( parsed . config ?. setup || { } ) ,
158
158
commits : params . commits . INIT ,
159
159
} ;
160
160
}
Original file line number Diff line number Diff line change @@ -74,14 +74,10 @@ async function validate(args: string[]) {
74
74
await cherryPick ( commits . INIT ) ;
75
75
76
76
// run commands
77
- if ( skeleton . config ?. testRunner ?. setup ?. commands ) {
77
+ if ( skeleton . config ?. setup ?. commands ) {
78
78
console . info ( "-- Running commands..." ) ;
79
79
80
- await runCommands (
81
- skeleton . config ?. testRunner ?. setup ?. commands ,
82
- // add optional setup directory
83
- skeleton . config ?. testRunner ?. directory
84
- ) ;
80
+ await runCommands ( skeleton . config ?. setup ?. commands ) ;
85
81
}
86
82
}
87
83
Original file line number Diff line number Diff line change @@ -987,9 +987,9 @@ Description.
987
987
tap : "--reporter=mocha-tap-reporter" ,
988
988
} ,
989
989
directory : "coderoad" ,
990
- setup : {
991
- commands : [ ] ,
992
- } ,
990
+ } ,
991
+ setup : {
992
+ commands : [ ] ,
993
993
} ,
994
994
appVersions : {
995
995
vscode : ">=0.7.0" ,
@@ -1026,9 +1026,9 @@ Description.
1026
1026
tap : "--reporter=mocha-tap-reporter" ,
1027
1027
} ,
1028
1028
directory : "coderoad" ,
1029
- setup : {
1030
- commands : [ ] ,
1031
- } ,
1029
+ } ,
1030
+ setup : {
1031
+ commands : [ ] ,
1032
1032
} ,
1033
1033
repo : {
1034
1034
uri : "https://path.to/repo" ,
@@ -1101,9 +1101,9 @@ Description.
1101
1101
tap : "--reporter=mocha-tap-reporter" ,
1102
1102
} ,
1103
1103
directory : "coderoad" ,
1104
- setup : {
1105
- commits : [ "abcdef1" , "123456789" ] ,
1106
- } ,
1104
+ } ,
1105
+ setup : {
1106
+ commits : [ "abcdef1" , "123456789" ] ,
1107
1107
} ,
1108
1108
repo : {
1109
1109
uri : "https://path.to/repo" ,
Original file line number Diff line number Diff line change @@ -8,15 +8,16 @@ const validJson = {
8
8
config : {
9
9
testRunner : {
10
10
directory : "coderoad" ,
11
- setup : {
12
- commands : [ ] ,
13
- } ,
11
+
14
12
args : {
15
13
filter : "--grep" ,
16
14
tap : "--reporter=mocha-tap-reporter" ,
17
15
} ,
18
16
command : "./node_modules/.bin/mocha" ,
19
17
} ,
18
+ setup : {
19
+ commands : [ ] ,
20
+ } ,
20
21
repo : {
21
22
uri : "http://github.com/somePath/toRepo.git" ,
22
23
branch : "codeBranch" ,
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ const validJson: Partial<T.Tutorial> = {
13
13
tap : "tap" ,
14
14
} ,
15
15
directory : "coderoad" ,
16
- setup : {
17
- commits : [ "abcdef1" ] ,
18
- commands : [ "npm install " ] ,
19
- } ,
16
+ } ,
17
+ setup : {
18
+ commits : [ "abcdef1 " ] ,
19
+ commands : [ "npm install" ] ,
20
20
} ,
21
21
repo : {
22
22
uri : "https://github.com/some-repo.git" ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export type TutorialConfig = {
10
10
repo : TutorialRepo ;
11
11
dependencies ?: TutorialDependency [ ] ;
12
12
reset ?: ConfigReset ;
13
+ setup ?: StepActions ;
13
14
} ;
14
15
15
16
/** Logical groupings of tasks */
@@ -69,7 +70,6 @@ export interface TestRunnerConfig {
69
70
command : string ;
70
71
args : TestRunnerArgs ;
71
72
directory ?: string ;
72
- setup ?: StepActions ;
73
73
}
74
74
75
75
export interface TutorialRepo {
You can’t perform that action at this time.
0 commit comments