mirror of
https://github.com/facebook/react.git
synced 2026-02-24 20:53:03 +00:00
* Forbid adding new files with @providesModule * Turn off Haste mode in Flow config * chmod a+x * Try to fix bash * Try to fix bash again
14 lines
367 B
Bash
Executable File
14 lines
367 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Make sure we don't introduce accidental @providesModule annotations.
|
|
EXPECTED='scripts/rollup/header.js'
|
|
ACTUAL=$(git grep -l @providesModule -- './*.js' ':!scripts/rollup/shims/*.js')
|
|
|
|
if [ "$EXPECTED" != "$ACTUAL" ]; then
|
|
echo "@providesModule crept into some new files?"
|
|
diff -u <(echo "$EXPECTED") <(echo "$ACTUAL") || true
|
|
exit 1
|
|
fi
|