-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow to execute all codemods at once
Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com>
- Loading branch information
Nikolai Lopin
committed
Jan 9, 2024
1 parent
ef3145c
commit 201f565
Showing
3 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if any command fails | ||
|
||
if [ ! -d "node_modules/@freenow/wave/lib/esm/codemods" ]; then | ||
echo "The 'codemods' folder does not exist." | ||
exit 1 | ||
fi | ||
|
||
# remove the first argument (the `run_v2_migration.sh) | ||
shift | ||
|
||
for file in node_modules/@freenow/wave/lib/esm/codemods/*; do | ||
if [ -f "$file" ]; then | ||
echo "Executing the rule: $file" | ||
npx jscodeshift --extensions=js,jsx,ts,tsx --parser=tsx -t="$file" "$@" | ||
fi | ||
done |