@gravity-ui/uikit-codemod
v1.1.1
Published
Codemods for @gravity-ui/uikit
Downloads
7
Readme
@gravity-ui/uikit-codemod ·
Scripts that help in migration for newer features in @gravity-ui/uikit
Usage
npx @gravity-ui/uikit-codemod <transform> <path> [...options]
transform
- transform name, see the list belowpath
- 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:
npx @gravity-ui/uikit-codemod --jscodeshift="--run-in-band --verbose=2"