@@ -5,10 +5,7 @@ import * as assert from "assert";
55import * as nls from "vscode-nls" ;
66import { ErrorHelper } from "../../common/error/errorHelper" ;
77import { InternalErrorCode } from "../../common/error/internalErrorCode" ;
8- import { PlatformType } from "../launchArgs" ;
9- import { AndroidPlatform } from "../android/androidPlatform" ;
10- import { IOSPlatform } from "../ios/iOSPlatform" ;
11- import { getRunOptions } from "./util" ;
8+ import { sendMessageToMetro } from "./util" ;
129import { Command } from "./util/command" ;
1310
1411nls . config ( {
@@ -28,25 +25,6 @@ export class ShowDevMenu extends Command {
2825
2926 async baseFn ( ) : Promise < void > {
3027 assert ( this . project ) ;
31-
32- const androidPlatform = new AndroidPlatform (
33- getRunOptions ( this . project , PlatformType . Android ) ,
34- {
35- packager : this . project . getPackager ( ) ,
36- } ,
37- ) as AndroidPlatform ;
38-
39- androidPlatform . showDevMenu ( ) . catch ( ( ) => { } ) ;
40-
41- if ( process . platform === "darwin" ) {
42- const iosPlatform = new IOSPlatform ( getRunOptions ( this . project , PlatformType . iOS ) , {
43- packager : this . project . getPackager ( ) ,
44- } ) ;
45-
46- iosPlatform . showDevMenu ( this . project ) . catch ( ( ) => { } ) ;
47- }
48- if ( process . platform === "win32" ) {
49- // TODO: implement Show DevMenu command for RNW
50- }
28+ await sendMessageToMetro ( "devMenu" , this . project ) ;
5129 }
5230}
0 commit comments