Skip to content

Commit

Permalink
fix: rename pkg and bin (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
vagusX authored Dec 7, 2019
1 parent d3322ee commit 2001a3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
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

0 comments on commit 2001a3e

Please sign in to comment.