react-native/local-cli
Trevor Brindle cb8a116d05 Use xcpretty for iOS build output if installed
Summary:
iOS/xcodebuild logging output sucks. It's completely unreadable because of how xcodebuild takes arguments. Fortunately a ruby gem has existed to fix this for years: xcpretty. You simply pipe xcodebuilds output to xcpretty and it cleans it up, showing relevant info in a more readable format.

This PR implements xcpretty output. It checks to see if xcpretty is in PATH, then uses it by default if it is, and can be disabled using a --verbose cli flag.

- Create a project from master
- run `react-native run-ios`
- Confirm output looks like this:

```tabrindle-mbp:shop-rn tabrindle$ make
Scanning 662 folders for symlinks in /Users/tabrindle/Developer/react-native/node_modules (5ms)
Found Xcode project Shop.xcodeproj
We couldn't boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time.
Launching iPhone 6 (iOS 10.3)...
Building using "xcodebuild -project Shop.xcodeproj -configuration Debug -scheme Shop -destination id=0CD9ABF3-A8E4-43D6-A52B-F437FF0F45A0 -derivedDataPath build"
▸ Building React/yoga [Debug]
▸ Check Dependencies
▸ Building React/double-conversion [Debug]
▸ Check Dependencies
▸ Running script 'Install Third Party'
▸ Building React/third-party [Debug]
▸ Check Dependencies
▸ Building React/jschelpers [Debug]
▸ Check Dependencies
▸ Building React/cxxreact [Debug]
▸ Check Dependencies
▸ Building React/React [Debug]
▸ Check Dependencies
▸ Running script 'Start Packager'
▸ Running script 'Include RCTJSCProfiler'
▸ Building RCTSettings/RCTSettings [Debug]
▸ Check Dependencies
▸ Building BVLinearGradient/BVLinearGradient [Debug]
▸ Check Dependencies
▸ Building RCTActionSheet/RCTActionSheet [Debug]
▸ Check Dependencies
▸ Building RCTLinking/RCTLinking [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/fishhook [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/RCTWebSocket [Debug]
▸ Check Dependencies
▸ Building RCTText/RCTText [Debug]
▸ Check Dependencies
▸ Building RCTNetwork/RCTNetwork [Debug]
▸ Check Dependencies
▸ Building RCTAnimation/RCTAnimation [Debug]
▸ Check Dependencies
▸ Building RCTGeolocation/RCTGeolocation [Debug]
▸ Check Dependencies
▸ Building ReactNativeNavigation/ReactNativeNavigation [Debug]
▸ Check Dependencies
▸ Building RNI18n/RNI18n [Debug]
▸ Check Dependencies
▸ Building RCTImage/RCTImage [Debug]
▸ Check Dependencies
▸ Building RNVectorIcons/RNVectorIcons [Debug]
▸ Check Dependencies
▸ Building RCTVibration/RCTVibration [Debug]
▸ Check Dependencies
▸ Building Shop/Shop [Debug]
▸ Check Dependencies
▸ Running script 'Bundle React Native code and images'
▸ Building Shop/ShopTests [Debug]
▸ Check Dependencies
▸ Build Succeeded
Installing build/Build/Products/Debug-iphonesimulator/Shop.app
Launching com.marketamerica.MAMobile
com.marketamerica.MAMobile: 43497```
- run `react-native run-ios --verbose`
- confirm output looks as normal

Nothing else should be affected. This is simply a developer experience change. If xcpretty is not already installed, nothing will change at all. Many of us using fastlane have been spoiled by this for years.
Closes https://github.com/facebook/react-native/pull/15607

Differential Revision: D5740684

Pulled By: shergin

fbshipit-source-id: 09ef21414b8b65be92595b19502b843fa943403d
2017-09-08 10:00:51 -07:00
..
__mocks__ Fix lint in local-cli 2016-11-14 11:13:42 -08:00
bundle @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
core @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
dependencies Reject local-cli promises with Error objects 2017-08-08 09:38:21 -07:00
eject Eject CLI command to re-create native folders 2017-02-03 12:58:46 -08:00
generator Move HelloWorld template to a single index.js entry point 2017-08-03 14:02:43 -07:00
info added info CLI command 2017-07-18 11:45:47 -07:00
init CLI: Add support for project templates 2017-02-06 12:31:25 -08:00
install Use Yarn for Install/Uninstall CLI if available 2017-02-02 05:13:33 -08:00
library Reject local-cli promises with Error objects 2017-08-08 09:38:21 -07:00
link @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07: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 Allow packager to be opened in specific terminal on Linux and Mac OS X 2017-08-24 14:26:24 -07:00
runIOS Use xcpretty for iOS build output if installed 2017-09-08 10:00:51 -07:00
server RN local-cli: fix the reporter creation code 2017-09-08 08:02:56 -07:00
templates @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
upgrade New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
util @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
.eslintrc Disallow trailing commas in react-native-github 2017-08-17 16:20:04 -07:00
cli.js packager: centralize babelRegisterOnly callsites 2017-01-06 06:13:54 -08:00
cliEntry.js @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
commands.js added info CLI command 2017-07-18 11:45:47 -07:00
setup_env.bat
setup_env.sh CLI: Adding shebang to setup_env.sh script 2017-05-31 02:46:23 -07:00
wrong-react-native.js Run eslint on all js files 2017-07-12 14:09:53 -07:00