diff --git a/README.md b/README.md index aecd2def40..a55ef9a4e2 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ npm install antd ## Usage example +### Use prebuilt bundle + ```jsx import { DatePicker } from 'antd'; ReactDOM.render(, mountNode); @@ -30,11 +32,27 @@ ReactDOM.render(, mountNode); Import style: ```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(, mountNode); +``` +No need to import style manually. ## Browser Support diff --git a/package.json b/package.json index 9be28f6691..c8322a102b 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "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", "jest": "jest", - "prepub":"node ./scripts/prepub", + "pre-pub":"node ./scripts/prepub", "pub": "antd-tools run pub", "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"