A collection of codemod scripts that help upgrade antd v4 using jscodeshift.(Inspired by react-codemod)
Usage
Before run codemod scripts, you’d better make sure to commit your local git changes firstly.
# global installation
npm i -g @ant-design/codemod-v4
# or for yarn user
# yarn global add @ant-design/codemod-v4
antd4-codemod src
# use npx
npx -p @ant-design/codemod-v4 antd4-codemod src
Codemod scripts introduction
v3-Component-to-compatible
Replace deprecated Form and Mention from @ant-design/compatible:
English | 简体中文
Ant Design v4 Codemod
A collection of codemod scripts that help upgrade antd v4 using jscodeshift.(Inspired by react-codemod)
Usage
Before run codemod scripts, you’d better make sure to commit your local git changes firstly.
Codemod scripts introduction
v3-Component-to-compatibleReplace deprecated
FormandMentionfrom@ant-design/compatible:v3-component-with-string-icon-props-to-v4Update component which contains string icon props with specific v4 Icon component from
@ant-design/icons.v3-Icon-to-v4-IconReplace v3 Icon with specific v4 Icon component.
v3-LocaleProvider-to-v4-ConfigProviderReplace v3 LocaleProvider with v4 ConfigProvider component.
v3-Modal-method-with-icon-to-v4Update
Modal.method()which contains string icon property with specific v4 Icon component.License
MIT