Skip to content

Instantly share code, notes, and snippets.

View its4zahoor's full-sized avatar

Abdul Zahoor Malik its4zahoor

View GitHub Profile
@parties
parties / renameReactJsToJsx.sh
Last active November 15, 2024 23:32
rename all *.js files containing React markup to *.jsx
# 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"' {} \;