Browse Source

update readme

pull/1534/head
yiminghe 9 years ago
parent
commit
12a7c32643
  1. 22
      README.md
  2. 2
      package.json

22
README.md

@ -22,6 +22,8 @@ npm install antd
## Usage example ## Usage example
### Use prebuilt bundle
```jsx ```jsx
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
ReactDOM.render(<DatePicker />, mountNode); ReactDOM.render(<DatePicker />, mountNode);
@ -30,11 +32,27 @@ ReactDOM.render(<DatePicker />, mountNode);
Import style: Import style:
```jsx ```jsx
import 'antd/lib/index.css'; // or 'antd/style/index.less' import 'antd/dist/antd.css'; // or 'antd/style/index.less'
``` ```
Use components on demand by writing as `import DatePicker from 'antd/lib/date-picker'` or use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd). ### Use modularized antd
use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd).
babel plugin config:
```
['antd', {
style: 'css'
}]
```
```jsx
import { DatePicker } from 'antd';
ReactDOM.render(<DatePicker />, mountNode);
```
No need to import style manually.
## Browser Support ## Browser Support

2
package.json

@ -123,7 +123,7 @@
"eslint-fix": "eslint --fix components test site scripts ./*.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md", "eslint-fix": "eslint --fix components test site scripts ./*.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md",
"test": "npm run lint && npm run dist && npm run jest", "test": "npm run lint && npm run dist && npm run jest",
"jest": "jest", "jest": "jest",
"prepub":"node ./scripts/prepub", "pre-pub":"node ./scripts/prepub",
"pub": "antd-tools run pub", "pub": "antd-tools run pub",
"beta": "antd-tools run beta", "beta": "antd-tools run beta",
"authors": "git log --format='%aN <%aE>' | sort -u | grep -v 'users.noreply.github.com' | grep -v 'alibaba-inc.com' | grep -v 'alipay.com' | grep -v 'taobao.com' > AUTHORS.txt" "authors": "git log --format='%aN <%aE>' | sort -u | grep -v 'users.noreply.github.com' | grep -v 'alibaba-inc.com' | grep -v 'alipay.com' | grep -v 'taobao.com' > AUTHORS.txt"

Loading…
Cancel
Save