From c6f06eac975af02e95872283778c46ee1d30757e Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Wed, 16 Jan 2019 14:51:39 +0000 Subject: [PATCH] Address feedback from review --- packages/scripts/README.md | 4 ++-- packages/scripts/scripts/build.js | 4 +--- packages/scripts/scripts/start.js | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/scripts/README.md b/packages/scripts/README.md index 8e0fae18b0f930..cc3f3b2b04a7c7 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -38,7 +38,7 @@ _Example:_ ### `build` -Builds the code for production to the `build` folder. It correctly bundles code in production mode and optimizes the build for the best performance. Your code is ready to be deployed. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). +Builds the code to the designated `build` folder in the configuration file. It correctly bundles code in production mode and optimizes the build for the best performance. Your code is ready to be deployed. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). _Example:_ @@ -145,7 +145,7 @@ This is how you execute the script with presented setup: ### `start` -Builds the code for development to the `build` folder. The script will automatically rebuild if you make changes to the code. You will see the build errors in the console. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). +Builds the code for development to the designated `build` folder in the configuration file. The script will automatically rebuild if you make changes to the code. You will see the build errors in the console. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). _Example:_ diff --git a/packages/scripts/scripts/build.js b/packages/scripts/scripts/build.js index 025607bff04791..9470274f76633c 100644 --- a/packages/scripts/scripts/build.js +++ b/packages/scripts/scripts/build.js @@ -13,8 +13,6 @@ const { hasProjectFile, } = require( '../utils' ); -const args = getCliArgs(); - const hasWebpackConfig = hasCliArg( '--config' ) || hasProjectFile( 'webpack.config.js' ) || hasProjectFile( 'webpack.config.babel.js' ); @@ -25,7 +23,7 @@ if ( hasWebpackConfig ) { const { status } = spawn( resolveBin( 'webpack' ), - [ ...args ], + getCliArgs(), { stdio: 'inherit' } ); process.exit( status ); diff --git a/packages/scripts/scripts/start.js b/packages/scripts/scripts/start.js index b425f2f6e38754..db42c33ba447fb 100644 --- a/packages/scripts/scripts/start.js +++ b/packages/scripts/scripts/start.js @@ -13,8 +13,6 @@ const { hasProjectFile, } = require( '../utils' ); -const args = getCliArgs(); - const hasWebpackConfig = hasCliArg( '--config' ) || hasProjectFile( 'webpack.config.js' ) || hasProjectFile( 'webpack.config.babel.js' ); @@ -22,7 +20,7 @@ const hasWebpackConfig = hasCliArg( '--config' ) || if ( hasWebpackConfig ) { const { status } = spawn( resolveBin( 'webpack' ), - [ '--watch', ...args ], + [ '--watch', ...getCliArgs() ], { stdio: 'inherit' } ); process.exit( status );