Skip to content

Commit

Permalink
doc(environment-setup): Update Android Document.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 7, 2021
1 parent b8d9801 commit d5974c1
Show file tree
Hide file tree
Showing 20 changed files with 111 additions and 87 deletions.
2 changes: 2 additions & 0 deletions website/src/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
body {
font-size: 14px;
font-family: 'Segoe UI Emoji';
font-family: 'Segoe UI Emoji', -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}

a {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 101 additions & 81 deletions website/src/pages/docs/environment-setup/android/README.md

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions website/src/pages/docs/environment-setup/ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ brew install watchman

[CocoaPods](https://cocoapods.org/) 是用 Ruby 构建的,并且可以使用 macOS 上可用的默认 Ruby 进行安装。 您可以使用 Ruby 版本管理器,但我们建议您使用 macOS 上可用的标准 Ruby,除非您知道自己在做什么。

> 目前 react-native@0.64 需要 `pod v1.10.0+`<!--rehype:style=color: #0ab100;--> 以上的版本,可以在 `ios/Podfile`<!--rehype:style=color: #e00000;--> 中确定使用那个版本的 `pod`
> 🚧 目前 react-native@0.64 需要 `pod v1.10.0+`<!--rehype:style=color: #0ab100;--> 以上的版本,可以在 `ios/Podfile`<!--rehype:style=color: #e00000;--> 中确定使用那个版本的 `pod`
<!--rehype:style=border-left: 8px solid #ffe564;background-color: #ffe56440;padding: 12px 16px;-->
使用默认的 Ruby 安装将要求您在安装 gems 时使用 `sudo`。(不过,这只是 gem 安装期间的问题。)
Expand All @@ -60,7 +60,7 @@ sudo gem install cocoapods -v 1.4.0

有关更多信息,请访问 [CocoaPods 入门指南](https://guides.cocoapods.org/using/getting-started.html)

### React Native 命令行界面
### `React Native 命令行界面`

React Native 有一个内置的命令行界面。 我们建议您在运行时使用 Node.js 附带的 `npx` 访问当前版本,而不是全局安装和管理特定版本的 CLI。 使用 `npx react-native <command>`,当前稳定版本的 CLI 将在命令运行时下载并执行。

Expand All @@ -69,7 +69,7 @@ React Native 有一个内置的命令行界面。 我们建议您在运行时使
## 创建一个新的应用程序

> ⚠️ 如果您之前安装了全局 `react-native-cli` 包,请将其删除,因为它可能会导致意外问题。
> 🚧 如果您之前安装了全局 `react-native-cli` 包,请将其删除,因为它可能会导致意外问题。
<!--rehype:style=border-left: 8px solid #ffe564;background-color: #ffe56440;padding: 12px 16px;-->
您可以使用 React Native 的内置命令行界面来生成一个新项目。 让我们创建一个名为 `AwesomeProject` 的新 React Native 项目:
Expand Down Expand Up @@ -98,15 +98,16 @@ npx react-native init AwesomeTSProject --template react-native-template-typescri

<!--rehype:style=background-color: rgb(118 247 149);-->
```shell
# 此模板默认集成了一些必用的依赖,如路由,组件库等
npx react-native init AwesomeProject --template @uiw/react-native-template
```

> ⚠️ 注意:如果上述命令失败,您可能在您的 PC 上全局安装了旧版本的 react-native 或 react-native-cli。 尝试卸载 `cli` 并使用 `npx` 运行 cli。
> 🚧 注意:如果上述命令失败,您可能在您的 PC 上全局安装了旧版本的 react-native 或 react-native-cli。 尝试卸载 `cli` 并使用 `npx` 运行 cli。
<!--rehype:style=border-left: 8px solid #ffe564;background-color: #ffe56440;padding: 12px 16px;-->
## 运行你的 React Native 应用程序

### `第 1 步启动 Metro`
#### `第 1 步`<!--rehype:style=background: #a5d4ff;--> 启动 Metro

首先,您需要启动 `Metro`,这是 `React Native` 附带的 `JavaScript` 打包器。 Metro “接收一个入口文件和各种选项,并返回一个包含所有代码及其依赖项的 JavaScript 文件。” —— [Metro Docs](https://facebook.github.io/metro/docs/concepts)

Expand All @@ -124,7 +125,7 @@ npx react-native start
> 如果您熟悉 `Web` 开发,`Metro` 很像 `webpack` —— 用于 React Native 应用程序。 与 `Kotlin``Java` 不同,`JavaScript` 不会被编译,React Native 也不会。 Bundling 与编译不同,但它可以帮助提高启动性能并将一些特定于平台的 `JavaScript` 转换为更广泛支持的 `JavaScript`
<!--rehype:style=border-left: 8px solid #ffe564;background-color: #ffe56440;padding: 12px 16px;-->
### `第 2 步:启动您的应用程序`
#### `第 2 步`<!--rehype:style=background: #a5d4ff;--> 启动您的应用程序

让 Metro Bundler 在自己的终端中运行。 在 React Native 项目文件夹中打开一个新终端。 运行以下命令:

Expand Down
1 change: 1 addition & 0 deletions website/src/pages/docs/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ npx react-native init AwesomeTSProject --template react-native-template-typescri

<!--rehype:style=background-color: rgb(118 247 149);-->
```shell
# 此模板默认集成了一些必用的依赖,如路由,组件库等
npx react-native init AwesomeProject --template @uiw/react-native-template
```

Expand Down

0 comments on commit d5974c1

Please sign in to comment.