Skip to content

Commit 63804db

Browse files
author
Martin Konicek
committed
CLI: Show npm / yarn output during 'react-native-init' when installing React and Jest
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
1 parent 8f0aed6 commit 63804db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

local-cli/init/init.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,21 @@ function generateProject(destinationRoot, newProjectName, options) {
7575

7676
if (yarnVersion) {
7777
console.log('Adding React...');
78-
execSync(`yarn add react@${reactVersion}`);
78+
execSync(`yarn add react@${reactVersion}`, {stdio: 'inherit'});
7979
} else {
8080
console.log('Installing React...');
81-
execSync(`npm install react@${reactVersion} --save --save-exact`);
81+
execSync(`npm install react@${reactVersion} --save --save-exact`, {stdio: 'inherit'});
8282
}
8383
if (!options['skip-jest']) {
8484
const jestDeps = (
8585
`jest babel-jest babel-preset-react-native react-test-renderer@${reactVersion}`
8686
);
8787
if (yarnVersion) {
8888
console.log('Adding Jest...');
89-
execSync(`yarn add ${jestDeps} --dev --exact`);
89+
execSync(`yarn add ${jestDeps} --dev --exact`, {stdio: 'inherit'});
9090
} else {
9191
console.log('Installing Jest...');
92-
execSync(`npm install ${jestDeps} --save-dev --save-exact`);
92+
execSync(`npm install ${jestDeps} --save-dev --save-exact`, {stdio: 'inherit'});
9393
}
9494
addJestToPackageJson(destinationRoot);
9595
}

0 commit comments

Comments
 (0)