codemod-v4 icon indicating copy to clipboard operation
codemod-v4 copied to clipboard

option to use a custom babylon config?

Open kriscarle opened this issue 5 years ago • 1 comments

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 avatar Mar 11 '20 23:03 kriscarle

@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>

vagusX avatar Mar 15 '20 07:03 vagusX