Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename pkg and bin #30

Merged
merged 1 commit into from
Dec 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
# Ant Design Codemod

> Still under development

A collection of codemod scripts that help upgrade antd v4 using [jscodeshift](https://github.com/facebook/jscodeshift).(Inspired by [react-codemod](https://github.com/reactjs/react-codemod))

[![NPM version](https://img.shields.io/npm/v/@ant-design/codemod.svg?style=flat)](https://npmjs.org/package/@ant-design/codemod)
[![NPM downloads](http://img.shields.io/npm/dm/@ant-design/codemod.svg?style=flat)](https://npmjs.org/package/@ant-design/codemod)
[![NPM version](https://img.shields.io/npm/v/@ant-design/codemod-v4.svg?style=flat)](https://npmjs.org/package/@ant-design/codemod-v4)
[![NPM downloads](http://img.shields.io/npm/dm/@ant-design/codemod-v4.svg?style=flat)](https://npmjs.org/package/@ant-design/codemod-v4)
[![CircleCI](https://circleci.com/gh/ant-design/codemod.svg?style=svg)](https://circleci.com/gh/ant-design/codemod)

## Usage

```shell
# global installation
npm i -g @ant-design/codemod

# for tsx
antd-codemod run --dir=src --parser=babylon
# for js
antd-codemod run --dir=src/**/*.tsx --parser=tsx

# or using npx
# for tsx
npx -p @ant-design/codemod antd-codemod run --dir=src --parser=tsx
npx -p @ant-design/codemod antd-codemod run --dir=src/**/*.tsx
npm i -g @ant-design/codemod-v4
antd4-codemod src

# for js
npx -p @ant-design/codemod antd-codemod run --dir=src
npx -p @ant-design/codemod antd-codemod run --dir=src/**/*.js
# use npx
npx -p @ant-design/codemod-v4 antd4-codemod src
```

**tips**

If you are using typescript, you can use `--parser=tsx` option.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@ant-design/codemod",
"name": "@ant-design/codemod-v4",
"version": "0.1.5",
"description": "Codemod for ant design v4 upgrade",
"bin": {
"antd-codemod": "./bin/antd-codemod.js"
"antd4-codemod": "./bin/antd-codemod.js"
},
"files": [
"bin",
Expand All @@ -14,13 +14,13 @@
"codemod",
"antd"
],
"homepage": "https://github.com/ant-design/codemod",
"homepage": "https://github.com/ant-design/codemod-v4",
"repository": {
"type": "git",
"url": "git@github.com:ant-design/codemod.git"
"url": "git@github.com:ant-design/codemod-v4.git"
},
"bugs": {
"url": "http://github.com/ant-design/codemod/issues"
"url": "http://github.com/ant-design/codemod-v4/issues"
},
"license": "MIT",
"engines": {
Expand Down