microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
src/utils/reactNativeCommandHelper.ts
13lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. |
| 3 | |
| 4 | import * as child_process from "child_process"; |
| 5 | |
| 6 | export class ReactNativeCommandHelper { |
| 7 | private static CMD_NAME = "react-native"; |
| 8 | |
| 9 | public static executeReactNativeCommand(projectRoot: string, command: string): child_process.ChildProcess { |
| 10 | // TODO: Update this to do more useful error checking |
| 11 | return child_process.spawn(ReactNativeCommandHelper.CMD_NAME, [command], {cwd: projectRoot}); |
| 12 | } |
| 13 | } |
| 14 | |