Skip to content

Instantly share code, notes, and snippets.

View kuasha420's full-sized avatar
🏠
Working from home

Arafat Zahan kuasha420

🏠
Working from home
View GitHub Profile
@parties
parties / renameReactJsToJsx.sh
Last active April 27, 2024 19:37
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"' {} \;