File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 "title" : " Extract style to StyleSheet"
3939 },
4040 {
41- "command" : " react-toolkit.readFile " ,
41+ "command" : " react-toolkit.convertToTS " ,
4242 "title" : " Convert to Typescript"
4343 },
4444 {
5656 ],
5757 "explorer/context" : [
5858 {
59- "command" : " react-toolkit.readFile" ,
59+ "when" : " resourceExtname == .js" ,
60+ "command" : " react-toolkit.convertToTS" ,
6061 "group" : " 1_modification@1"
6162 },
6263 {
64+ "when" : " resourceExtname == .js" ,
6365 "command" : " react-toolkit.convertCjsToEsm" ,
6466 "group" : " 1_modification@2"
6567 }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export function activate(context: vscode.ExtensionContext) {
55 console . log ( 'Congratulations, your extension "react-toolkit" is now active!' ) ;
66
77 const commandExtractStyle = vscode . commands . registerCommand ( 'react-toolkit.extractStyle' , extractStyle ) ;
8- const commandReadFile = vscode . commands . registerCommand ( 'react-toolkit.readFile ' , convertFileToTypescript ) ;
8+ const commandReadFile = vscode . commands . registerCommand ( 'react-toolkit.convertToTS ' , convertFileToTypescript ) ;
99 const commandCjsToEsm = vscode . commands . registerCommand ( 'react-toolkit.convertCjsToEsm' , convertCjsToEsm ) ;
1010
1111 context . subscriptions . push ( commandExtractStyle ) ;
You can’t perform that action at this time.
0 commit comments