https://github.com/gravity-ui/uikit-codemod
https://github.com/gravity-ui/uikit-codemod
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/gravity-ui/uikit-codemod
- Owner: gravity-ui
- Created: 2023-06-19T13:22:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-05T17:53:02.000Z (over 2 years ago)
- Last Synced: 2025-02-28T21:38:22.501Z (over 1 year ago)
- Language: TypeScript
- Size: 187 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @gravity-ui/uikit-codemod · [](https://www.npmjs.com/package/@gravity-ui/uikit-codemod) [](https://github.com/gravity-ui/uikit-codemod/actions/workflows/ci.yml?query=branch:main)
Scripts that help in migration for newer features in `@gravity-ui/uikit`
## Usage
`npx @gravity-ui/uikit-codemod [...options]`
* `transform` - transform name, see the list below
* `path` - Files or directories to transform
* use flags `--dry` and `--print` to view transform result in "preview" mode (files won't be changed)
## Available transforms
### `6-normal-visitable`
Transform `normal-visitbale` to `normal` of `view` prop and add prop `visitable` without value for Link
### `6-change-side`
Changes the `side` value from `left` to `start` for Button.Icon, Disclosure, ButtonIcon
### `6-toaster-type-to-theme`
Transforms `type` to `theme` in `add` method, and replaces `error` value to `danger` value
### `6-positive-to-success`
Changes the `positive` value to `success` of `theme` prop for Alert and Card components
### `5-move-components`
Move components to `@gravity-ui/components` package
### `5-progress-props`
Remap Progress props
### `5-popup-props`
Remap Popup props
## jscodeshift arguments
You can pass jscodeshift arguments directly with the `--jscodeshift="..."` flag. For example:
```sh
npx @gravity-ui/uikit-codemod --jscodeshift="--run-in-band --verbose=2"
```