mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
Fix typo in in use-in-typescript.md
This commit is contained in:
parent
4b045fc43f
commit
46add091ca
@ -14,7 +14,8 @@ Ensure your system has installed latest version of [yarn](https://yarnpkg.com) o
|
||||
Create a new project named `antd-demo-ts` using yarn.
|
||||
|
||||
```bash
|
||||
$ yarn create react-app antd-demo-ts --scripts-version=react-scripts-ts
|
||||
$ yarn global add create-react-app
|
||||
$ create-react-app antd-demo-ts --scripts-version=react-scripts-ts
|
||||
```
|
||||
|
||||
If you are using npm (we will use yarn in the following instructions, it's ok to replace yarn with npm)
|
||||
@ -90,11 +91,11 @@ $ yarn add react-app-rewired --dev
|
||||
```diff
|
||||
/* package.json */
|
||||
"scripts": {
|
||||
- "start": "react-scripts start",
|
||||
- "start": "react-scripts-ts start",
|
||||
+ "start": "react-app-rewired start --scripts-version react-scripts-ts",
|
||||
- "build": "react-scripts build",
|
||||
- "build": "react-scripts-ts build",
|
||||
+ "build": "react-app-rewired build --scripts-version react-scripts-ts",
|
||||
- "test": "react-scripts test --env=jsdom",
|
||||
- "test": "react-scripts-ts test --env=jsdom",
|
||||
+ "test": "react-app-rewired test --env=jsdom --scripts-version react-scripts-ts",
|
||||
}
|
||||
```
|
||||
|
@ -14,7 +14,8 @@ title: 在 TypeScript 中使用
|
||||
使用 yarn 创建项目。
|
||||
|
||||
```bash
|
||||
$ yarn create react-app antd-demo-ts --scripts-version=react-scripts-ts
|
||||
$ yarn global add create-react-app
|
||||
$ create-react-app antd-demo-ts --scripts-version=react-scripts-ts
|
||||
```
|
||||
|
||||
如果你使用的是 npm(接下来我们都会用 yarn 作为例子,如果你习惯用 npm 也没问题)。
|
||||
@ -89,11 +90,11 @@ $ yarn add react-app-rewired --dev
|
||||
```diff
|
||||
/* package.json */
|
||||
"scripts": {
|
||||
- "start": "react-scripts start",
|
||||
- "start": "react-scripts-ts start",
|
||||
+ "start": "react-app-rewired start --scripts-version react-scripts-ts",
|
||||
- "build": "react-scripts build",
|
||||
- "build": "react-scripts-ts build",
|
||||
+ "build": "react-app-rewired build --scripts-version react-scripts-ts",
|
||||
- "test": "react-scripts test --env=jsdom",
|
||||
- "test": "react-scripts-ts test --env=jsdom",
|
||||
+ "test": "react-app-rewired test --env=jsdom --scripts-version react-scripts-ts",
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user