Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit bdd0491

Browse files
committed
docs(cli): add explanation of the skip-cleanup command
1 parent 0420253 commit bdd0491

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ If those defaults do not work for you, the script accepts some arguments:
9595
- `--react-scripts-version`: expects the `react-scripts` version you are using in your project i.e `2.0.3`. If not given it will be implied from your `node_modules` and if it cannot be implied the version `2.1.2` will be the default. Consider setting it if you **ejected** and are not using the latest `react-scripts` version.
9696
- `-p|--public-path`: expects a relative URL where `/` is the root. If you serve your files using an external webserver this argument is to match with your web server configuration. More information can be found in [webpack configuration guide](https://webpack.js.org/configuration/output/#output-publicpath).
9797
- default: "".
98+
- `--skip-cleanup`: Skips the initial cleanup of the build folder. Could be beneficial when the cleanup is handled beforehand and some other files are moved to the build folder before running this script.
9899
- `-v|--verbose`: display webpack build output.
99100

100101
# Contributions

utils/cliHandler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ module.exports = meow(
2020
2121
--react-scripts-version Version of the react-scripts package used in your project i.e 2.0.3. If not given it will be implied from your package.json and if it cannot be implied the major version 2 will be the default.
2222
23+
--skip-cleanup Skips the initial cleanup of the build folder. Could be beneficial when the cleanup is handled beforehand and some other files are moved to the build folder before running this script.
24+
2325
-v, --verbose
2426
2527
Examples
2628
$ cra-build-watch -b dist/ -p /assets
2729
$ cra-build-watch --chunk-filename './js/[chunkhash].[name]' -o './js/myapp'
2830
$ cra-build-watch -b dist/ -p /assets --chunk-filename './js/[name]/[hash].js' -v
31+
$ cra-build-watch --skip-cleanup
2932
`,
3033
{
3134
flags: {

0 commit comments

Comments
 (0)