Reverted commit D3757516

Summary:
Sometimes when working with a team of developers, someone adds a library but does not link it.  To identify if this required linking, you have to type `react-native link` and then read a wall of text to see if rnpm handled the issue.   This can be sped up with a friendly logging level for previously linked messages.

**This PR turns this:**
![screen shot 2016-08-21 at 11 49 07 am](https://cloud.githubusercontent.com/assets/997157/17838588/84223264-6796-11e6-81d2-075d30942a69.png)

**Into this:**
![screen shot 2016-08-21 at 11 52 31 am](https://cloud.githubusercontent.com/assets/997157/17838592/92c2ce64-6796-11e6-884d-e5af8f4c2b5a.png)

Which is a pretty nice experience!   This also helps you quickly identify when 1 thing wasn't linked, at a glance, like so!
![image](https://cloud.githubusercontent.com/assets/997157/17838613/22568c8c-6797-11e6-8e12-c73746ec0eff.png)
Closes https://github.com/facebook/react-native/pull/9507

Differential Revision: D3757516

Pulled By: bestander

fbshipit-source-id: 811436d354383581ca77bdc82665040aac962c06
This commit is contained in:
Gant Laborde 2016-08-23 09:36:50 -07:00 committed by Facebook Github Bot 8
parent 85a2d6a65d
commit c19339783d

View File

@ -2,7 +2,6 @@ const log = require('npmlog');
const path = require('path');
const uniq = require('lodash').uniq;
const flatten = require('lodash').flatten;
const chalk = require('chalk');
const isEmpty = require('lodash').isEmpty;
const promiseWaterfall = require('./promiseWaterfall');
@ -33,7 +32,7 @@ const linkDependencyAndroid = (androidProject, dependency) => {
const isInstalled = isInstalledAndroid(androidProject, dependency.name);
if (isInstalled) {
log.info(chalk.grey(`Android module ${dependency.name} is already linked`));
log.info(`Android module ${dependency.name} is already linked`);
return null;
}
@ -59,7 +58,7 @@ const linkDependencyIOS = (iOSProject, dependency) => {
const isInstalled = isInstalledIOS(iOSProject, dependency.config.ios);
if (isInstalled) {
log.info(chalk.grey(`iOS module ${dependency.name} is already linked`));
log.info(`iOS module ${dependency.name} is already linked`);
return;
}