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

Commit5776877

Browse files
committed
tutorial command progress
1 parent8740c1d commit5776877

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

‎package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎src/editor/commands/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,16 @@ export const createCommands = ({context, machine, storage, git, position}: Creat
9696

9797
machine.send('TUTORIAL_LOADED')
9898
},
99-
[COMMANDS.TUTORIAL_SETUP]:async(tutorial:CR.Tutorial)=>{
99+
[COMMANDS.TUTORIAL_SETUP]:async(tutorial:G.Tutorial)=>{
100+
101+
// TODO: allow multiple coding languages in a tutorial
100102
console.log('tutorial setup',tutorial)
101103
// setup onSave hook
102-
constlanguageIds=tutorial.meta.languages
103-
console.log(`languageIds:${languageIds.join(', ')}`)
104+
constlanguageId=tutorial.codingLanguage
105+
//console.log(`languageIds: ${languageIds.join(', ')}`)
104106
vscode.workspace.onDidSaveTextDocument((document:vscode.TextDocument)=>{
105107
console.log('save document',document)
106-
if(languageIds.includes(document.languageId)&&document.uri.scheme==='file'){
108+
if(document.uri.scheme==='file'&&languageId===document.languageId){
107109
// do work
108110
machine.send('TEST_RUN')
109111
}

‎tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"paths": {
2222
"typings": ["../typings/index.d.ts"],
2323
"typings/graphql": ["../typings/graphql.d.ts"],
24+
"@api": ["services/api/index"],
2425
"@gql/*": ["services/api/gql/*"]
2526
},
2627
"allowJs":true

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp