From 925ab7268f611fe0ae35641516c15d29e6081396 Mon Sep 17 00:00:00 2001 From: chyipin Date: Fri, 24 Feb 2017 13:32:15 -0700 Subject: [PATCH] Use real build path name in build output (#1478) Use the configured appBuild value in paths.js instead of hard-coding it to 'build'. This is helpful for the ejected case where the appBuild path is changed to another folder name. --- packages/react-scripts/scripts/build.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/scripts/build.js b/packages/react-scripts/scripts/build.js index e5272b3792a..0522201d26d 100644 --- a/packages/react-scripts/scripts/build.js +++ b/packages/react-scripts/scripts/build.js @@ -223,7 +223,8 @@ function build(previousSizeMap) { console.log(' ' + chalk.green('"homepage"') + chalk.cyan(': ') + chalk.green('"http://myname.github.io/myapp"') + chalk.cyan(',')); console.log(); } - console.log('The ' + chalk.cyan('build') + ' folder is ready to be deployed.'); + var build = path.relative(process.cwd(), paths.appBuild); + console.log('The ' + chalk.cyan(build) + ' folder is ready to be deployed.'); console.log('You may also serve it locally with a static server:') console.log(); if (useYarn) { @@ -231,7 +232,7 @@ function build(previousSizeMap) { } else { console.log(' ' + chalk.cyan('npm') + ' install -g pushstate-server'); } - console.log(' ' + chalk.cyan('pushstate-server') + ' build'); + console.log(' ' + chalk.cyan('pushstate-server') + ' ' + build); console.log(' ' + chalk.cyan(openCommand) + ' http://localhost:9000'); console.log(); }