From 63c69778294ff8c38b76ee8471971e48e9fc1b2d Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 2 Mar 2017 11:24:44 +0800 Subject: [PATCH] docs: update introduce --- README.md | 2 -- docs/react/introduce.en-US.md | 27 +++++---------------------- docs/react/introduce.zh-CN.md | 25 +++++-------------------- 3 files changed, 10 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index fc425ac8ea..8a3d737b0d 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,6 @@ npm install antd ## Usage -### Use prebuilt bundle - ```jsx import { DatePicker } from 'antd'; ReactDOM.render(, mountNode); diff --git a/docs/react/introduce.en-US.md b/docs/react/introduce.en-US.md index 0ad1c13ca8..86f7efcfe1 100644 --- a/docs/react/introduce.en-US.md +++ b/docs/react/introduce.en-US.md @@ -47,24 +47,20 @@ You can subscribe to this feed for new version notification: https://github.com/ ## Installation -### Using npm to install +### Using npm or yarn -**We recommend using npm to install**,it not only makes development easier,but you can also take advantage of the whole ecosystem. - -If using npm to install, you could use `import` or `require`. - -Stable version: +**We recommend using npm or yarn to install**,it not only makes development easier,but you can also take advantage of the whole ecosystem. ```bash $ npm install antd --save ``` -Beta version: - ```bash -$ npm install antd@beta --save +$ yarn add antd ``` +If you are in a bad network enviornment,you can try other registers and tools like [cnpm](https://github.com/cnpm/cnpm). + ### Import in Browser [![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd) @@ -73,26 +69,13 @@ We provide `antd.js` `antd.css` and `antd.min.js` `antd.min.css` under `antd/dis > It's not recommended to use the already built files, as you cannot get bugfixes from the dependencies of antd. -#### stable - - https://unpkg.com/antd/dist/antd.js - https://unpkg.com/antd/dist/antd.css - https://unpkg.com/antd/dist/antd.min.js - https://unpkg.com/antd/dist/antd.min.css -#### beta - -- https://unpkg.com/antd@beta/dist/antd.js -- https://unpkg.com/antd@beta/dist/antd.css -- https://unpkg.com/antd@beta/dist/antd.min.js -- https://unpkg.com/antd@beta/dist/antd.min.css - -> Here is an [example](https://github.com/ant-design/antd-init/tree/master/examples/build-antd-standalone) of how to build your own antd.js if you are using antd@<1.0.0. - ## Usage -### Use prebuilt bundle - ```jsx import { DatePicker } from 'antd'; ReactDOM.render(, mountNode); diff --git a/docs/react/introduce.zh-CN.md b/docs/react/introduce.zh-CN.md index 8d41d719d6..4ba471c333 100644 --- a/docs/react/introduce.zh-CN.md +++ b/docs/react/introduce.zh-CN.md @@ -47,24 +47,20 @@ title: Ant Design of React ## 安装 -### 使用 npm 安装 +### 使用 npm 或 yarn 安装 -**我们推荐使用 npm 的方式进行开发**,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。 - -可以通过 npm 直接安装到项目中,使用 `import` 或 `require` 进行引用。 - -稳定版: +**我们推荐使用 npm 或 yarn 的方式进行开发**,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。 ```bash $ npm install antd --save ``` -开发版本: - ```bash -$ npm install antd@beta --save +$ yarn add antd ``` +如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)。 + ### 浏览器引入 [![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd) @@ -73,22 +69,11 @@ $ npm install antd@beta --save > 不推荐使用构建文件,因为难以获得底层依赖模块的 bug 快速修复支持。 -#### stable - - https://unpkg.com/antd/dist/antd.js - https://unpkg.com/antd/dist/antd.css - https://unpkg.com/antd/dist/antd.min.js - https://unpkg.com/antd/dist/antd.min.css -#### beta - -- https://unpkg.com/antd@beta/dist/antd.js -- https://unpkg.com/antd@beta/dist/antd.css -- https://unpkg.com/antd@beta/dist/antd.min.js -- https://unpkg.com/antd@beta/dist/antd.min.css - -> 对于 1.0 之前的版本,这里有一个 [自行构建的例子](https://github.com/ant-design/antd-init/tree/master/examples/build-antd-standalone) 以供参考。 - ## 示例 ```jsx