Codemods
Install codemods
For time being, you must install codemods locally to the app to run them. Eventually they can be run via npx. You can remove codemods after running them, if you so chose.
yarn add @clearkit/codemods
Run codemods
Run each codemod on a given directory. In the example below, the codemod is run against all files in /client/src
using the v1-imports
transform:
Important note on node versions
Codemods will only run in Node v18 due to a limitation of jscodeshift
. Run codemods in a separate terminal window/tab and run nvm use before running codemods. If you haven't installed node 18, you will need to run nvm install 18
first/
nvm use 18
Run codemod after install
./client/node_modules/@clearkit/codemods/dist/index.js client/src v1-imports
./client/node_modules/@clearkit/codemods/dist/index.js client/src v1-buttons
Available codemods for v1
- v1-buttons
- v1-imports
- v1-popper
- v1-popper-options
- v1-toggle-props