Skip to content

Commit

Permalink
chore: add bash-script to convert all js files at once
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-kashkoush committed Nov 10, 2024
1 parent e698ac2 commit 4cbe256
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rename-js-to-ts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Navigate to the src directory
cd src || exit 1

# Rename .js files to .ts
find . -type f -name "*.js" -exec bash -c 'mv "$0" "${0%.js}.ts"' {} \;

# Rename .jsx files to .tsx
find . -type f -name "*.jsx" -exec bash -c 'mv "$0" "${0%.jsx}.tsx"' {} \;

echo "Renaming completed!"

0 comments on commit 4cbe256

Please sign in to comment.