pbambusek / kodemod

A simple codemod runner for codemods built as Babel plugins. Prettier included.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kodemod

A simple codemod runner for codemods built as Babel plugins. Prettier included.

Install

yarn add kodemod

Usage

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.

License

This project is licensed under the MIT License

About

A simple codemod runner for codemods built as Babel plugins. Prettier included.

License:MIT License


Languages

Language:TypeScript 98.3%Language:JavaScript 1.7%