react-native/local-cli
Martin Konicek 94711bfb06 Use yarn when available
Summary:
**Motivation**

`react-native init` takes minutes even on a fast network. Yarn makes it much quicker.

When yarn is not installed on the system:

<img width="440" alt="screenshot 2016-10-31 22 21 19" src="https://cloud.githubusercontent.com/assets/346214/19873897/7bad5662-9fb9-11e6-85fb-ad4879949dad.png">

When yarn is installed:

<img width="441" alt="screenshot 2016-10-31 22 02 20" src="https://cloud.githubusercontent.com/assets/346214/19873898/7baf4c56-9fb9-11e6-96b3-007f93d2438a.png">

Also added the option `react-native init AwesomeApp --npm` as a fallback in case yarn is not stable enough for some people (I saw some Github issues that yarn hangs for example; for me it works great though).

**Test plan**
1. Publish to Sinopia: https://github.com/facebook/react-native/tree/master/react-native-cli
2. `react-native init AwesomeApp`

***Tested the following setups***

- New CLI - uses yarn, new react-native - uses yarn
- Old CLI (1.0.0) - doesn't use yarn, new react-native - uses yarn
-
Closes https://github.com/facebook/react-native/pull/10626

Differential Revision: D4110883

Pulled By: bestander

fbshipit-source-id: 8a3427e2bc9158cf5fadd8ddf5b31e4b50ce6453
2016-11-01 09:28:52 -07:00
..
__mocks__ Remove fastpath 2016-10-20 00:14:03 -07:00
__tests__ Temporarily disable cli tests 2015-11-12 07:05:01 -08:00
android CLI errors if no package.json is found 2016-10-14 10:58:43 -07:00
bundle Break out defaults, add flow for Config 2016-10-22 06:13:42 -07:00
core Fixes react-native link for apps with extra xcode projects in the root folder 2016-10-24 13:13:46 -07:00
dependencies Remove platform blacklists 2016-09-23 08:13:46 -07:00
generate Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
generator Use yarn when available 2016-11-01 09:28:52 -07:00
generator-android Fix indent of .gradle files 2016-10-19 16:58:36 -07:00
generator-ios replace old ATS key name to new one. 2016-10-09 12:13:37 -07:00
init Merge `rnpm cli` into react-native 2016-07-30 09:13:46 -07:00
install Further RNPM integration 2016-08-22 08:58:37 -07:00
library Merge `rnpm cli` into react-native 2016-07-30 09:13:46 -07:00
link Fix 'mapHeaderSearchPaths' 2016-10-24 15:13:30 -07:00
logAndroid Merge `rnpm cli` into react-native 2016-07-30 09:13:46 -07:00
logIOS Merge `rnpm cli` into react-native 2016-07-30 09:13:46 -07:00
runAndroid Update Android support URL 2016-10-24 13:43:36 -07:00
runIOS Fix error in react-native run-ios when Product Name and Scheme are inequal 2016-10-14 14:43:52 -07:00
server RN: Show Warning for Background Remote Debuggers 2016-10-31 11:29:57 -07:00
upgrade Merge `rnpm cli` into react-native 2016-07-30 09:13:46 -07:00
util Break out defaults, add flow for Config 2016-10-22 06:13:42 -07: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 Break out defaults, add flow for Config 2016-10-22 06:13:42 -07:00
commands.js Break out defaults, add flow for Config 2016-10-22 06:13:42 -07:00
default.config.js Remove platform blacklists 2016-09-23 08:13:46 -07:00
generate-android.js Add license headers to local-cli 2015-10-20 09:55:21 -07:00
generator-utils.js Android package name validator consistent with docs 2016-09-09 04:13:49 -07: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