Skip to content

Commit

Permalink
docs: upgrade Getting Started with antd-init@2
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Sep 18, 2016
1 parent e6c406a commit 681576d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/react/getting-started.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ A new project can be created using CLI tools.

```bash
$ mkdir antd-demo && cd antd-demo
$ antd-init --type plain-react
$ antd-init
```

`antd-init` will run `npm install` after a project is created. If it fails, you can run `npm install` by yourself.
Expand All @@ -55,7 +55,7 @@ $ antd-init --type plain-react
By default, besides the scaffolding needed to start the development, a fully working Todo application is created.
You may study this example later. For now, just follow this guide in order to get some experience working with the result of `antd-init`.

Replace the content of `src/entries/index.js` with the following code.
Replace the content of `index.js` with the following code.
As you can see, there is no difference between antd's components and usual React components.

```jsx
Expand Down Expand Up @@ -91,7 +91,7 @@ ReactDOM.render(<App />, document.getElementById('root'));
### 4. Development & Debugging

Run your project and visit http://127.0.0.1:8989
Run your project and visit http://127.0.0.1:8000

```bash
$ npm start
Expand Down
6 changes: 3 additions & 3 deletions docs/react/getting-started.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $ npm install antd-init -g

```bash
$ mkdir antd-demo && cd antd-demo
$ antd-init --type plain-react
$ antd-init
```

antd-init 会自动安装 npm 依赖,若有问题则可自行安装。
Expand All @@ -55,7 +55,7 @@ antd-init 会自动安装 npm 依赖,若有问题则可自行安装。

脚手架会生成一个 Todo 应用实例(一个很有参考价值的 React 上手示例),先不管它,我们用来测试组件。

直接用下面的代码替换 `src/entries/index.js` 的内容,用 React 的方式直接使用 antd 组件。
直接用下面的代码替换 `index.js` 的内容,用 React 的方式直接使用 antd 组件。

```jsx
import React from 'react';
Expand Down Expand Up @@ -90,7 +90,7 @@ ReactDOM.render(<App />, document.getElementById('root'));
### 4. 开发调试

一键启动调试,访问 http://127.0.0.1:8989 查看效果。
一键启动调试,访问 http://127.0.0.1:8000 查看效果。

```bash
$ npm start
Expand Down

0 comments on commit 681576d

Please sign in to comment.