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

Commitb38e406

Browse files
committed
fix vscode / storybook dep conflict
1 parente2665b5 commitb38e406

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

‎src/editor/commands/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import*asvscodefrom'vscode'
21
import{join}from'path'
3-
import{setStorage}from'../storage'
2+
import*asCRfrom'typings'
3+
import*asvscodefrom'vscode'
44
importReactWebViewfrom'../ReactWebView'
5+
import{setStorage}from'../storage'
56
import{isEmptyWorkspace}from'../workspace'
6-
import*asCRfrom'typings'
77
importrunTestfrom'./runTest'
88

99
constCOMMANDS={
@@ -44,7 +44,6 @@ export const createCommands = ({ context, machine, storage, git, position }: Cre
4444

4545
// activate machine
4646
webview=newReactWebView(context.extensionPath)
47-
console.log('webview',webview.panel.webview.postMessage)
4847
machine.activate()
4948
},
5049
// open React webview

‎tslint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"class-name":true,
99
"semicolon": [true,"never"],
1010
"triple-equals":true,
11-
"interface-name": [true,"never-prefix"]
11+
"interface-name": [true,"never-prefix"],
12+
"object-literal-sort-keys":false
1213
},
1314
"defaultSeverity":"warning",
1415
"no-submodule-imports":false

‎web-app/.storybook/config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ import '@alifd/next/dist/next.css'
22
import{configure}from'@storybook/react'
33
import'../src/styles/index.css'
44

5+
// setup acquireVsCodeApi mock
6+
//@ts-ignore
7+
global.acquireVsCodeApi=()=>({
8+
postMessage(event:string){
9+
console.log('postMessage',event)
10+
}
11+
})
12+
13+
514
// automatically import all files ending in *.stories.tsx
615
constreq=require.context('../stories',true,/\.stories\.tsx$/)
716

‎web-app/src/utils/vscode.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import { Action } from 'typings'
22

33
declarevaracquireVsCodeApi:any
44

5-
//@ts-ignore
6-
constvscode=window.acquireVsCodeApi ?acquireVsCodeApi() :{
7-
postMessage(event:string){
8-
console.log('postMessage',event)
9-
}
10-
}
5+
constvscode=acquireVsCodeApi()
116

127
exportfunctionsend(event:string|Action){
138
returnvscode.postMessage(event)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp