From 060c1c669ffb1bd03798f29801967ad0c79d80b3 Mon Sep 17 00:00:00 2001 From: Geoff Davis Date: Sat, 11 Mar 2017 20:43:32 -0600 Subject: [PATCH 1/3] Fix for issue #1798: Suggested 'yarn build' versus 'yarn run build' --- packages/react-scripts/scripts/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index b8a820c821d..b33efe5f6f2 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -149,7 +149,7 @@ module.exports = function( console.log(chalk.cyan(` ${displayedCommand} start`)); console.log(' Starts the development server.'); console.log(); - console.log(chalk.cyan(` ${displayedCommand} run build`)); + console.log(chalk.cyan(` ${displayedCommand} build`)); console.log(' Bundles the app into static files for production.'); console.log(); console.log(chalk.cyan(` ${displayedCommand} test`)); From 9d080d3e6f17b47363042fee3c18493f061cc9ad Mon Sep 17 00:00:00 2001 From: Geoff Davis Date: Sat, 11 Mar 2017 20:55:23 -0600 Subject: [PATCH 2/3] remove 'run' from 'yarn test' command as well --- packages/react-scripts/scripts/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index b33efe5f6f2..993686e520c 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -155,7 +155,7 @@ module.exports = function( console.log(chalk.cyan(` ${displayedCommand} test`)); console.log(' Starts the test runner.'); console.log(); - console.log(chalk.cyan(` ${displayedCommand} run eject`)); + console.log(chalk.cyan(` ${displayedCommand} eject`)); console.log( ' Removes this tool and copies build dependencies, configuration files' ); From afbad4eb6cd3867db9d99b619b276272eea6d5e5 Mon Sep 17 00:00:00 2001 From: Geoff Davis Date: Sat, 11 Mar 2017 22:42:49 -0600 Subject: [PATCH 3/3] conditionally show 'run' if Yarn is not available --- packages/react-scripts/scripts/init.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index 993686e520c..9e2ea5cdcd0 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -149,13 +149,17 @@ module.exports = function( console.log(chalk.cyan(` ${displayedCommand} start`)); console.log(' Starts the development server.'); console.log(); - console.log(chalk.cyan(` ${displayedCommand} build`)); + console.log( + chalk.cyan(` ${displayedCommand} ${useYarn ? '' : 'run '}build`) + ); console.log(' Bundles the app into static files for production.'); console.log(); console.log(chalk.cyan(` ${displayedCommand} test`)); console.log(' Starts the test runner.'); console.log(); - console.log(chalk.cyan(` ${displayedCommand} eject`)); + console.log( + chalk.cyan(` ${displayedCommand} ${useYarn ? '' : 'run '}eject`) + ); console.log( ' Removes this tool and copies build dependencies, configuration files' );