react-native/local-cli/util
Jirat K 1c249e4804 Use Yarn for Install/Uninstall CLI if available
Summary:
Make `react-native install` and `uninstall` cli to use yarn if available (fixes #11122)

**Test plan Yarn**

1. Publish to Sinopia: https://github.com/facebook/react-native/tree/master/react-native-cli
2. react-native init AwesomeApp
3. react-native install react-native-fit-image
4. react-native uninstall react-native-fit-image

**Test plan NPM**
1. Publish to Sinopia: https://github.com/facebook/react-native/tree/master/react-native-cli
2. react-native init AwesomeAppNPM --npm
3. react-native install react-native-fit-image
4. react-native uninstall react-native-fit-image

**output (yarn.lock)**

```
> react-native install react-native-fit-image
yarn add v0.16.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency
└─ react-native-fit-image@1.4.6
  Done in 4.11s.
rnpm-install info Module react-native-fit-image has been successfully
Closes https://github.com/facebook/react-native/pull/11174

Differential Revision: D4441872

fbshipit-source-id: 05bd30e1ad14bdbe861259c88e1f18df77cfa54f
2017-02-02 05:13:33 -08:00
..
__mocks__ Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
Config.js Merge `rnpm config` with the `cli config`, step 1 2017-01-09 07:58:33 -08:00
PackageManager.js Use Yarn for Install/Uninstall CLI if available 2017-02-02 05:13:33 -08:00
assertRequiredOptions.js Merge `rnpm cli` into react-native 2016-07-30 09:13:46 -07:00
copyAndReplace.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
findSymlinksPaths.js Add symlinks under node_modules as part of projectRoots 2017-01-31 03:43:39 -08:00
isPackagerRunning.js Fix comment typos 2016-06-03 02:43:57 -07:00
isValidPackageName.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
log.js Add ability to silence packager logs to stdout 2016-03-15 12:10:31 -07:00
parseCommandLine.js Merge `rnpm cli` into react-native 2016-07-30 09:13:46 -07:00
walk.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
yarn.js Fix a bug in determining if yarn is available 2016-12-05 06:13:33 -08:00