microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/utils/reactNativeCommandHelper.ts
13lines · modeblame
9cf5eef2leolee10 years ago | 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. | |
| 3 | | |
7b341316Jimmy Thomson10 years ago | 4 | import * as child_process from "child_process"; |
9cf5eef2leolee10 years ago | 5 | |
| 6 | export class ReactNativeCommandHelper { | |
7b341316Jimmy Thomson10 years ago | 7 | private static CMD_NAME = "react-native"; |
8ba55f4cJimmy Thomson10 years ago | 8 | |
3fde2079Jimmy Thomson10 years ago | 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}); | |
9cf5eef2leolee10 years ago | 12 | } |
| 13 | } |