Skip to content

Commit

Permalink
📝 improve create-react-app documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 6, 2019
1 parent 9b65863 commit ab36853
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
8 changes: 6 additions & 2 deletions docs/react/use-in-typescript.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ Let's create a TypeScript project by using `create-react-app`, then import `antd

Ensure your system has installed latest version of [yarn](https://yarnpkg.com) or [npm](https://www.npmjs.com/).

Create a new project named `antd-demo-ts` using yarn.
Create a new [cra-template-typescript](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript) project named `antd-demo-ts` using yarn.

```bash
$ yarn create react-app antd-demo-ts --typescript
$ yarn create react-app antd-demo-ts --template typescript

# or

npx create-react-app my-app --template typescript
```

If you are using npm (we will use yarn in the following instructions, it's ok to replace yarn with npm)
Expand Down
8 changes: 6 additions & 2 deletions docs/react/use-in-typescript.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ title: 在 TypeScript 中使用

请确保电脑上已经安装了最新版的 [yarn](https://yarnpkg.com) 或者 [npm](https://www.npmjs.com/)

使用 yarn 创建项目
使用 yarn 创建 [cra-template-typescript](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript) 项目

```bash
$ yarn create react-app antd-demo-ts --typescript
$ yarn create react-app antd-demo-ts --template typescript

# or

npx create-react-app my-app --template typescript
```

如果你使用的是 npm(接下来我们都会用 yarn 作为例子,如果你习惯用 npm 也没问题)。
Expand Down
4 changes: 4 additions & 0 deletions docs/react/use-with-create-react-app.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Before all start, you may need install [yarn](https://github.com/yarnpkg/yarn/).

```bash
$ yarn create react-app antd-demo

# or

$ npx create-react-app antd-demo
```

The tool will create and initialize environment and dependencies automatically, please try config your proxy setting or use another npm registry if any network errors happen during it.
Expand Down
4 changes: 4 additions & 0 deletions docs/react/use-with-create-react-app.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ title: 在 create-react-app 中使用

```bash
$ yarn create react-app antd-demo

# or

$ npx create-react-app antd-demo
```

工具会自动初始化一个脚手架并安装 React 项目的各种必要依赖,如果在过程中出现网络问题,请尝试配置代理或使用其他 npm registry。
Expand Down

0 comments on commit ab36853

Please sign in to comment.