Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8aaf99

Browse files
authored
Merge pull request#422 from coderoad/refactor
Refactor
2 parents177e6d6 +7edba22 commitd8aaf99

File tree

10 files changed

+27
-31
lines changed

10 files changed

+27
-31
lines changed

‎docs/docs/config-yml.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ config:
3838
tap:--reporter=mocha-tap-reporter
3939
## The directory where to run the test runner from. If not specified, tests will run from the root of the project. Optional.
4040
directory:coderoad
41-
## Commits to load to setup the test runner. Optional.
42-
setup:
43-
## A list of commands to run to configure the tutorial
44-
commands:
45-
-npm install
4641
## App versions helps to ensure compatability with the Extension
4742
appVersions:
4843
## Ensure compatability with a minimal VSCode CodeRoad version
4944
vscode:'>=0.7.0'
45+
## Setup commands
46+
setup:
47+
## A list of commands to run to configure the tutorial
48+
commands:
49+
-npm install
5050
## Repo information to load code from
5151
##
5252
repo:

‎docs/docs/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Error loading commits:
99
Callback must be a function
1010
```
1111

12-
If you get the above error when running`coderoad build`, check your node version with`node --version`. If it's less than version 12, try upgrading and run the command again.
12+
If you get the above error when running`coderoad build`, check your node version with`node --version`. If it's less than version 12, try upgrading and run the command again.

‎docs/docs/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ sidebar_label: Examples
66

77
Check out some of these tutorial repositories for reference:
88

9-
-https://github.com/coderoad/fcc-learn-npm
10-
-https://github.com/coderoad/fcc-basic-node-and-express
9+
-<https://github.com/coderoad/fcc-learn-npm>
10+
-<https://github.com/coderoad/fcc-basic-node-and-express>

‎docs/docs/yaml.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,11 @@ config:
7070
tap:--reporter=mocha-tap-reporter
7171
## The directory where to run the test runner from. If not specified, tests will run from the root of the project. Optional.
7272
directory:coderoad
73-
## Commits to load to setup the test runner. Optional.
74-
##
75-
setup:
76-
# - commit1
77-
# - commit2
78-
## A list of commands to run to configure the tutorial
79-
commands:
80-
[]
81-
# - npm install
73+
## Initial setup
74+
##
75+
setup:
76+
## A list of commands to run to configure the tutorial
77+
commands:[]
8278
## App versions helps to ensure compatability with the Extension
8379
appVersions:
8480
## Ensure compatability with a minimal VSCode CodeRoad version

‎package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434
"watch":"tsc -watch -p ./"
3535
},
3636
"dependencies": {
37-
"@types/assert":"^1.5.1",
38-
"@types/jest":"^26.0.8",
39-
"@types/jsdom":"^16.2.3",
40-
"@types/node":"^14.0.27",
41-
"@types/node-fetch":"^2.5.7",
42-
"@types/semver":"^7.3.1",
43-
"@typescript-eslint/eslint-plugin":"^3.7.1",
44-
"@typescript-eslint/parser":"^3.7.1",
4537
"chokidar":"^3.4.1",
4638
"dotenv":"^8.2.0",
4739
"eslint":"^7.6.0",
@@ -55,6 +47,14 @@
5547
"vscode-extension-telemetry":"^0.1.6"
5648
},
5749
"devDependencies": {
50+
"@types/assert":"^1.5.1",
51+
"@types/jest":"^26.0.8",
52+
"@types/jsdom":"^16.2.3",
53+
"@types/node":"^14.0.27",
54+
"@types/node-fetch":"^2.5.7",
55+
"@types/semver":"^7.3.1",
56+
"@typescript-eslint/eslint-plugin":"^3.7.1",
57+
"@typescript-eslint/parser":"^3.7.1",
5858
"eslint-config-prettier":"^6.11.0",
5959
"eslint-config-react-app":"^5.2.1",
6060
"eslint-plugin-flowtype":"^5.2.0",

‎src/actions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export { default as onTutorialConfigContinue } from './onTutorialConfigContinue'
44
export{defaultasonValidateSetup}from'./onValidateSetup'
55
export{defaultasonRunReset}from'./onRunReset'
66
export{defaultasonErrorPage}from'./onErrorPage'
7-
export{onRunTest,onTestPass}from'./onTest'
7+
export{runTest,onTestPass}from'./onTest'
88
export{onOpenLogs}from'./onOpenLogs'

‎src/actions/onTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export const onTestPass = (action: T.Action, context: Context): void => {
99
git.saveCommit('Save progress')
1010
}
1111

12-
exportconstonRunTest=(action?:T.Action):void=>{
12+
exportconstrunTest=(action?:T.Action):void=>{
1313
vscode.commands.executeCommand(COMMANDS.RUN_TEST,action?.payload)
1414
}

‎src/channel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Channel implements Channel {
7373
actions.onOpenLogs(action)
7474
return
7575
case'EDITOR_RUN_TEST':
76-
actions.onRunTest(action)
76+
actions.runTest(action)
7777
return
7878
case'EDITOR_RUN_RESET_LATEST':
7979
actions.onRunReset({type:'LATEST'},this.context)

‎src/services/hooks/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import openFiles from './utils/openFiles'
77
importrunCommandsfrom'./utils/runCommands'
88
importrunVSCodeCommandsfrom'./utils/runVSCodeCommands'
99
import{onErrorastelemetryOnError}from'../telemetry'
10-
import{onRunTest}from'../../actions/onTest'
10+
import{runTest}from'../../actions/onTest'
1111
importloggerfrom'../logger'
1212

1313
exportconstonInit=async(actions:TT.StepActions):Promise<void>=>{
@@ -35,7 +35,7 @@ export const onSolutionEnter = async (actions: TT.StepActions): Promise<void> =>
3535
awaitopenFiles(actions?.files)
3636
awaitrunCommands(actions?.commands)
3737
awaitrunVSCodeCommands(actions?.vscodeCommands)
38-
awaitonRunTest()
38+
awaitrunTest()
3939
}
4040

4141
exportconstonReset=async(actions:TT.StepActions):Promise<void>=>{

‎src/services/testRunner/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks): ((params: an
6363
// get tutorial step from position
6464
// check the step actions for specific command
6565
// NOTE: cannot just pass in step actions as the test can be called by:
66-
// - onEditorSave, onWatcher, onSolution,onRunTest, onSubTask
66+
// - onEditorSave, onWatcher, onSolution,runTest, onSubTask
6767
constlevels=data.levels
6868
constlevel=levels.find((l)=>l.id===position.levelId)
6969
conststep=level?.steps.find((s)=>s.id===position.stepId)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp