A simple codemod runner for codemods built as Babel plugins. Prettier included.
yarn add kodemod
The kodemod expects a single Babel plugin and a path to directory which the plugin should be applied to.
yarn kodemod -p path/to/plugin.ts path/to/refactor
If the plugin needs some options, they can be passed as a JSON object
yarn kodemod -p path/to/plugin.ts -o '{"doMagic":true}' path/to/refactor
If a file is transformed, it is also formatted by Prettier before its saved. The runner looks for a Prettier config based on the file location.
This project is licensed under the MIT License