Skip to content

Instantly share code, notes, and snippets.

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

Ivan Lynch ivanlynch

🏠
Working from home
View GitHub Profile
@ivanlynch
ivanlynch / renameReactJsToJsx.sh
Created September 18, 2024 13:35 — forked from parties/renameReactJsToJsx.sh
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"' {} \;
@ivanlynch
ivanlynch / jest-to-vitest.sh
Created September 18, 2024 13:34 — forked from wojtekmaj/jest-to-vitest.sh
Automatically migrate Jest project to Vitest
#!/bin/bash
# Ensure we're working on the latest version of the main branch
git switch main
git fetch
git pull
# Create a new branch
git switch -c vitest