Created
July 15, 2019 17:31
-
-
Save ProdigySim/3a09b4b9b2d662b4cc338f4328697b05 to your computer and use it in GitHub Desktop.
Some junk that nobody should have to use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## aws-amplify-react-native uses a weird export syntax that breaks our jest/babel config: | |
| ## https://github.com/aws-amplify/amplify-js/issues/2686 | |
| ## https://github.com/aws-amplify/amplify-js/pull/3102 | |
| ## This fix just edits those files to use a more normal syntax. | |
| function fix_imports() { | |
| echo Fixing $1 | |
| sed -i'.bak' -E 's/export default [a-zA-Z0-9_]+ *= /export default /' $1 | |
| } | |
| echo "Running fix script for amplify-react-native exports" | |
| fix_imports node_modules/aws-amplify-react-native/dist/AmplifyI18n.js | |
| fix_imports node_modules/aws-amplify-react-native/dist/AmplifyMessageMap.js | |
| fix_imports node_modules/aws-amplify-react-native/dist/AmplifyTheme.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment