react-native/local-cli
David Gröger 85c8333bc8 run-android-on-specific-device
Summary:
At the moment the run-android command from the react-native cli does run all available devices at once. However it would be extreme useful to have the option to choose only one specific device/simulator.
Therefore i've created a new flag for the command 'run-android': --deviceIdFromList 'deviceIdFromList' in order
to install and launch apps on a specific device/simulator from the command line.

'deviceIdFromList'  is the id listed on the output of the command 'adb devices'.

I've tested my code with the following commands:
react-native run-android --deviceIdFromList "Not existing id"
react-native run-android --deviceIdFromList
react-native run-android --deviceIdFromList "id of a simulator"
react-native run-android --deviceIdFromList "id of a device"

Output:
![not-existing-device](https://cloud.githubusercontent.com/assets/9102810/17931086/d843abc8-6a09-11e6-995d-8c737dd5ed5c.png)
![empty-flag](https://cloud.githubusercontent.com/assets/9102810/17931087/d8443930-6a09-11e6-94f3-d
Closes https://github.com/facebook/react-native/pull/9568

Differential Revision: D4335133

Pulled By: mkonicek

fbshipit-source-id: a827628316be1b5751225851323b1131f451574c
2016-12-15 19:43:32 -08:00
..
__mocks__ Fix lint in local-cli 2016-11-14 11:13:42 -08:00
bundle fbsource 2016-12-13 18:58:34 -08:00
core react-native link (aka rnpm) support for Windows 2016-12-10 16:58:28 -08:00
dependencies BREAKING: expose `getTransformOptions` directly in configuration 2016-11-28 07:28:33 -08:00
generator Fix instructions in 'react-native init' 2016-12-12 09:13:30 -08:00
init CLI: Show npm / yarn output during 'react-native-init' when installing React and Jest 2016-12-06 13:58:31 -08:00
install Further RNPM integration 2016-08-22 08:58:37 -07:00
library Fix lint in local-cli 2016-11-21 10:28:34 -08:00
link react-native link (aka rnpm) support for Windows 2016-12-10 16:58:28 -08:00
logAndroid Use native Promise in local-cli 2016-11-21 10:28:34 -08:00
logIOS Use native Promise in local-cli 2016-11-21 10:28:34 -08:00
runAndroid run-android-on-specific-device 2016-12-15 19:43:32 -08:00
runIOS Make run-ios find if a device is booted better 2016-12-01 09:58:32 -08:00
server Add fbjs definitions to flow config 2016-12-08 02:43:25 -08:00
templates/HelloWorld Update template app's Flow config to Flow v0.37 2016-12-14 12:28:30 -08:00
upgrade New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
util Fix a bug in determining if yarn is available 2016-12-05 06:13:33 -08:00
.eslintrc Break out defaults, add flow for Config 2016-10-22 06:13:42 -07:00
cli.js Monkey-patch `fs` with graceful-fs before anything else runs 2016-10-14 11:13:54 -07:00
cliEntry.js Use native Promise in local-cli 2016-11-21 10:28:34 -08:00
commands.js Rewrite 'react-native init' and 'react-native upgrade' without using Yeoman in preparation for templates support 2016-11-18 18:28:51 -08:00
default.config.js Allow custom platforms for the RN Packager on a per-project basis 2016-12-02 09:43:31 -08:00
setup_env.bat Fix comments on .bat file 2015-10-28 21:36:07 -04:00
setup_env.sh Change ulimit to 2048 for non root Mac users 2016-02-06 11:45:37 -08:00
wrong-react-native.js Fix usage of react-native cli inside package.json scripts 2016-04-26 15:42:35 -07:00