mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Update all our local scripts to use `build` instead of `build2`. There are still downstream scripts that depend on `build2`, though, so we can't remove it yet.
15 lines
416 B
Bash
Executable File
15 lines
416 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Ensure errors are minified in production
|
|
|
|
OUT=$(git --no-pager grep -n --untracked --no-exclude-standard 'FIXME (minify-errors-in-prod)' -- './build/*')
|
|
|
|
if [ "$OUT" != "" ]; then
|
|
echo "$OUT";
|
|
echo -e "\n";
|
|
echo "Detected an unminified error message in the production build. User-facing errors message must have a corresponding error code in scripts/error-codes/codes.json."
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|