You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,8 @@ By default the script will generate everything into `build/` at your project roo
85
85
86
86
If those defaults do not work for you, the script accepts some arguments:
87
87
88
+
-`--after-initial-build-hook`: accepts a string of shell code that will be run only once after the initial build in the same process as the `cra-build-watch`.
89
+
-`--after-rebuild-hook`: accepts a string of shell code that will be run every time webpack rebuilds your project after a filesystem change. It runs in the same process as `cra-build-watch`.
88
90
-`-b|--build-path`: expects either an absolute or relative path. If a relative path is given it will be prefixed by your project root path.
89
91
- default: `yourProjectRoot/build`.
90
92
-`--chunk-filename`: Set the naming you want to use for non-entry chunk files. Accepts webpack placeholders such as `[id]`, `[name]`, `[hash]`. Directories can be supplied.
@@ -99,4 +101,4 @@ If those defaults do not work for you, the script accepts some arguments:
99
101
100
102
# Contributions
101
103
102
-
All contributions are welcomed. Please base your PR on the `develop` branch rather than `master`.
Copy file name to clipboardExpand all lines: utils/cliHandler.js
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,10 @@ module.exports = meow(
18
18
19
19
-p, --public-path Public URL.
20
20
21
+
--after-rebuild-hook Run a command after each build/rebuild (e.g. 'node ./afterbuild.js')
22
+
23
+
--after-initial-build-hook Run a command after each the initial build only (e.g. 'node ./afterbuild.js')
24
+
21
25
--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.
0 commit comments