Skip to content

Instantly share code, notes, and snippets.

@mdestafadilah
Created May 10, 2022 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdestafadilah/2ad7684e513c7cc10ee73fe962663914 to your computer and use it in GitHub Desktop.
Save mdestafadilah/2ad7684e513c7cc10ee73fe962663914 to your computer and use it in GitHub Desktop.
RENAME JS TO JSX FOR VITEJS FROM CRA - REACTJS PROJECT
source:
1. https://medium.com/@sheniff/using-shell-to-rename-files-in-bulk-ee657f1a06
2. https://gist.github.com/mustafaturan/32df16bb4c49fbd837f777000f4b9aa2?permalink_comment_id=3837386#gistcomment-3837386
How to:
1. Create file, ex: renamejstojsx.sh copy paste from source:#1
2. In your project open bash or Cmder as Terminal execution
3. Run ```bash renamejstojsx.sh```
4. Done, sruput coffe again.
@mdestafadilah
Copy link
Author

this my example bash
for x in src/**/*.js; do mv "$x" "${x%.js}.jsx"; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment