codemod-v4
codemod-v4 copied to clipboard
option to use a custom babylon config?
I needed to switch from Typescript to Flow.
For anyone else using flow, I was able to modify the babylon.config.json to change "typescript" to "flow" and then the tool ran perfectly.
In my case it was installed globally by npm at ~/.nvm/versions/node/v12.16.1/lib/node_modules/@ant-design/codemod-v4/bin/babylon.config.json
@kriscarle would you like to try running scripts using jscodeshift directly, like the way js-codemod running. In fact, I am not familiar with flow, so far I don't have much time to support that, PR is welcome if you are available.
npm install -g jscodeshift
git clone https://github.com/ant-design/codemod-v4.git
cd codemod-v4
npm install
jscodeshift -t transforms/<codemod-script> <file>