From d3065f6895ea710a9aac9cb90af61d723df48feb Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Tue, 6 Dec 2016 13:47:49 -0800 Subject: [PATCH] CLI: Show npm / yarn output during 'react-native-init' when installing React and Jest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: I missed this while doing the Yeoman wipeout. Currently we just print: Installing React... Installing Jest... This diff makes it print the output of those commands. **Test Plan** Published react-native to Sinopia, ran `react-native init MyApp`, saw the output: Installing Jest... ⸨░░░░░░░░░░░░░░░⸩ ⠸ normalizeTree: ... Reviewed By: bestander Differential Revision: D4286640 fbshipit-source-id: e554f03a4729c2de85eba527f10f4b727de722e4 --- local-cli/init/init.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/local-cli/init/init.js b/local-cli/init/init.js index e6a7e73df..15f9837df 100644 --- a/local-cli/init/init.js +++ b/local-cli/init/init.js @@ -75,10 +75,10 @@ function generateProject(destinationRoot, newProjectName, options) { if (yarnVersion) { console.log('Adding React...'); - execSync(`yarn add react@${reactVersion}`); + execSync(`yarn add react@${reactVersion}`, {stdio: 'inherit'}); } else { console.log('Installing React...'); - execSync(`npm install react@${reactVersion} --save --save-exact`); + execSync(`npm install react@${reactVersion} --save --save-exact`, {stdio: 'inherit'}); } if (!options['skip-jest']) { const jestDeps = ( @@ -86,10 +86,10 @@ function generateProject(destinationRoot, newProjectName, options) { ); if (yarnVersion) { console.log('Adding Jest...'); - execSync(`yarn add ${jestDeps} --dev --exact`); + execSync(`yarn add ${jestDeps} --dev --exact`, {stdio: 'inherit'}); } else { console.log('Installing Jest...'); - execSync(`npm install ${jestDeps} --save-dev --save-exact`); + execSync(`npm install ${jestDeps} --save-dev --save-exact`, {stdio: 'inherit'}); } addJestToPackageJson(destinationRoot); }