-
-
Save ivanlynch/3bc2df270e2229e535d8fd1a91c57d92 to your computer and use it in GitHub Desktop.
rename all *.js files containing React markup to *.jsx
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
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx | |
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment