This file contains hidden or 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
#!/bin/sh | |
# | |
# This is a super quick and dirty codemod for migration a codebase from Flow to TypeScript. | |
# | |
# Step 1: | |
# npm i -g jscodeshift | |
# Step 2: rename all .js files to .ts(x) | |
# find src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; | |
# find storybook -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; | |
# find src/**/components -name "*.ts" -exec sh -c 'mv "$0" "${0%.ts}.tsx"' {} \; |
OlderNewer