0.1.1 • Published 4 years ago

@rock-kit/ui-codemods v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

category: packages

ui-codemods

The ui-codemods should make it easier to deal with API changes when upgrading Rock Content UI libraries.

npm  build-status  MIT License  Code of Conduct

Installation

The codemod scripts can be installed via the following command:

yarn add @rock-kit/ui-codemods

The configuration files are located in the rockkit-config package. This can be installed via the following command:

yarn add @rock-kit/rockkit-config

Executing Codemods Using rockkit-cli

All available codemods can also be executed using the rockkit-cli rockkit codemod command. See rockkit-cli for more detailed documentation.

Updating Deprecated Props

This codemod helps you update your project by renaming props that have had names changed (e.g., onReady => onOpen).

jscodeshift -t node_modules/@rock-kit/ui-codemods/lib/updatePropNames.js <path> --config=node_modules/@rock-kit/rockkit-config/codemod-configs/v<version number ex. 5 or 6>/propNames.config.json

Updating Package Imports

This codemod helps you update your project by renaming imports that have changed (e.g., rock-kit => @rock-kit/<package name>).

jscodeshift -t node_modules/@rock-kit/ui-codemods/lib/updateImports.js <path> --config=node_modules/@rock-kit/rockkit-config/codemod-configs/v<version number ex. 5 or 6>/imports.config.json
0.1.1

4 years ago

0.1.0

4 years ago