README.md

This commit is contained in:
shikong 2024-10-25 21:06:27 +08:00
parent 221d5573d4
commit 2773535e9d
Signed by: Shikong
GPG Key ID: BD85FF18B373C341

View File

@ -1,70 +1,75 @@
# Getting Started with Create React App
# 使用 Create React App 快速开始
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
此项目是使用 [Create React App](https://github.com/facebook/create-react-app) 初始化的。
## Available Scripts
## 创建项目
```shell
npx create-react-app <项目名>
```
In the project directory, you can run:
## 可用脚本
在项目目录中,您可以运行:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
在开发模式下运行应用。
打开 [http://localhost:3000](http://localhost:3000) 在浏览器中查看。
The page will reload when you make changes.\
You may also see any lint errors in the console.
当您进行更改时,页面将重新加载。
您还可以在控制台中看到任何 lint 错误。
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
启动测试运行器的交互式监视模式。
有关更多信息,请参见[运行测试](https://facebook.github.io/create-react-app/docs/running-tests)部分。
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
将应用构建为生产模式到 `build` 文件夹。
它正确地将 React 打包到生产模式,并优化构建以获得最佳性能。
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
构建是压缩的,文件名包含哈希值。
您的应用已准备好部署!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
有关更多信息,请参见[部署](https://facebook.github.io/create-react-app/docs/deployment)部分。
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
**注意:这是一个单向操作。一旦您执行了 `eject`,就无法回头了!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
如果您对构建工具和配置选择不满意,您可以随时 `eject`。此命令将从您的项目中移除单一构建依赖项。
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
相反它将复制所有配置文件和传递依赖项webpack、Babel、ESLint 等)直接到您的项目中,以便您完全控制它们。除了 `eject` 之外的所有命令仍然有效,但它们将指向复制的脚本,以便您可以调整它们。此时您将完全自行负责。
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
您不必使用 `eject`。精选的功能集适用于小型和中型部署,您不应觉得有义务使用此功能。然而,我们理解,如果您准备好了,这个工具如果不能自定义,将不会有用。
## Learn More
## 了解更多
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
您可以在 [Create React App 文档](https://facebook.github.io/create-react-app/docs/getting-started) 中了解更多信息。
To learn React, check out the [React documentation](https://reactjs.org/).
要学习 React请查看 [React 文档](https://reactjs.org/)。
### Code Splitting
### 代码分割
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
本节已移至:[代码分割](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
### 分析包大小
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
本节已移至:[分析包大小](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
### 制作渐进式 Web 应用
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
本节已移至:[渐进式 Web 应用](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
### 高级配置
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
本节已移至:[高级配置](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
### 部署
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
本节已移至:[部署](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
### `npm run build` 无法压缩
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
本节已移至:[`npm run build` 无法压缩](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)