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

Commit0ec0902

Browse files
committed
refactor setup/solution actions
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parenta9d6561 commit0ec0902

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

‎src/actions/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export { default as onValidateSetup } from './onValidateSetup'
55
export{defaultasonRunReset}from'./onRunReset'
66
export{defaultasonErrorPage}from'./onErrorPage'
77
export{defaultasonTestPass}from'./onTestPass'
8+
export{onSetupActions,onSolutionActions}from'./onActions'

‎src/actions/setupActions.tsrenamed to‎src/actions/onActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface SetupActions {
1313
dir?:string
1414
}
1515

16-
exportconstsetupActions=async({ actions, send, dir}:SetupActions):Promise<void>=>{
16+
exportconstonSetupActions=async({ actions, send, dir}:SetupActions):Promise<void>=>{
1717
if(!actions){
1818
return
1919
}
@@ -49,7 +49,7 @@ export const setupActions = async ({ actions, send, dir }: SetupActions): Promis
4949
}
5050
}
5151

52-
exportconstsolutionActions=async(params:SetupActions):Promise<void>=>{
52+
exportconstonSolutionActions=async(params:SetupActions):Promise<void>=>{
5353
awaitgit.clear()
54-
returnsetupActions(params).catch(onError)
54+
returnonSetupActions(params).catch(onError)
5555
}

‎src/channel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import*asTfrom'typings'
22
import*asvscodefrom'vscode'
3-
import{setupActions,solutionActions}from'./actions/setupActions'
3+
import{setupActions,solutionActions}from'./actions/onActions'
44
import{COMMANDS}from'./commands'
55
importContextfrom'./services/context/context'
66
importloggerfrom'./services/logger'
@@ -62,12 +62,12 @@ class Channel implements Channel {
6262
// load step actions (git commits, commands, open files)
6363
case'SETUP_ACTIONS':
6464
awaitvscode.commands.executeCommand(COMMANDS.SET_CURRENT_POSITION,action.payload.position)
65-
setupActions({actions:action.payload.actions,send:this.send})
65+
actions.onSetupActions({actions:action.payload.actions,send:this.send})
6666
return
6767
// load solution step actions (git commits, commands, open files)
6868
case'SOLUTION_ACTIONS':
6969
awaitvscode.commands.executeCommand(COMMANDS.SET_CURRENT_POSITION,action.payload.position)
70-
awaitsolutionActions({actions:action.payload.actions,send:this.send})
70+
awaitactions.onSolutionActions({actions:action.payload.actions,send:this.send})
7171
// run test following solution to update position
7272
vscode.commands.executeCommand(COMMANDS.RUN_TEST)
7373
return

‎src/commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as T from 'typings'
22
import*asTTfrom'typings/tutorial'
33
import*asvscodefrom'vscode'
44
importcreateTestRunnerfrom'./services/testRunner'
5-
import{setupActions}from'./actions/setupActions'
5+
import{onSetupActions}from'./actions/onActions'
66
importcreateWebViewfrom'./services/webview'
77
importloggerfrom'./services/logger'
88

@@ -57,7 +57,7 @@ export const createCommands = ({ extensionPath, workspaceState }: CreateCommandP
5757
if(setup){
5858
// setup tutorial test runner commits
5959
// assumes git already exists
60-
awaitsetupActions({
60+
awaitonSetupActions({
6161
actions:setup,
6262
send:webview.send,
6363
dir:testRunnerConfig.directory||testRunnerConfig.path,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp