Skip to content

Commit

Permalink
Address feedback from review
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Jan 16, 2019
1 parent f4032be commit c6f06ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:_

Expand Down Expand Up @@ -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:_

Expand Down
4 changes: 1 addition & 3 deletions packages/scripts/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const {
hasProjectFile,
} = require( '../utils' );

const args = getCliArgs();

const hasWebpackConfig = hasCliArg( '--config' ) ||
hasProjectFile( 'webpack.config.js' ) ||
hasProjectFile( 'webpack.config.babel.js' );
Expand All @@ -25,7 +23,7 @@ if ( hasWebpackConfig ) {

const { status } = spawn(
resolveBin( 'webpack' ),
[ ...args ],
getCliArgs(),
{ stdio: 'inherit' }
);
process.exit( status );
Expand Down
4 changes: 1 addition & 3 deletions packages/scripts/scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ const {
hasProjectFile,
} = require( '../utils' );

const args = getCliArgs();

const hasWebpackConfig = hasCliArg( '--config' ) ||
hasProjectFile( 'webpack.config.js' ) ||
hasProjectFile( 'webpack.config.babel.js' );

if ( hasWebpackConfig ) {
const { status } = spawn(
resolveBin( 'webpack' ),
[ '--watch', ...args ],
[ '--watch', ...getCliArgs() ],
{ stdio: 'inherit' }
);
process.exit( status );
Expand Down

0 comments on commit c6f06ea

Please sign in to comment.