From 1a8738648a67922ca4cbe5a2c6c9a39c81132f1b Mon Sep 17 00:00:00 2001 From: zhouyong <550468167@qq.com> Date: Fri, 12 Dec 2025 15:03:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20[Issue:=20#IDB8P4]=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-turbo-log=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-turbo-log.md | 22 ++++++++++++++-------- zh-cn/react-native-turbo-log.md | 2 ++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/en/react-native-turbo-log.md b/en/react-native-turbo-log.md index 6f37c004..6408ed4c 100644 --- a/en/react-native-turbo-log.md +++ b/en/react-native-turbo-log.md @@ -13,16 +13,21 @@ Please refer to the Releases page of the third-party library for the matching ve > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-turbo-log) +## Installation and Usage + +Go to the project directory and execute the following instruction: + #### npm ```bash -npm install @@react-native-ohos/react-native-turbo-log +npm install @react-native-ohos/react-native-turbo-log ``` #### yarn + ```bash -yarn add @@react-native-ohos/react-native-turbo-log +yarn add @react-native-ohos/react-native-turbo-log ``` @@ -162,13 +167,13 @@ const styles = StyleSheet.create({ ## Using Codegen Version >= @react-native-ohos/react-native-turbo-log@0.6.1, which has been adapted to codegen-lib to generate bridge code. -This library has been adapted to Codegen. Before using it, you need to actively execute the generation of third-party library bridge code. For details, please refer to the Codegen Usage Documentation. +This library has been adapted to Codegen. Before using it, you need to actively execute the generation of third-party library bridge code. For details, please refer to the [ Codegen Usage Documentation](/en/codegen.md). ## Link This step is a guide for manually configuring native dependencies. First, you need to open the HarmonyOS project harmony in the project using DevEco Studio. -### Add overrides field to oh-package.json in the project root directory +### 1. Add overrides field to oh-package.json in the project root directory ```json { @@ -180,7 +185,7 @@ First, you need to open the HarmonyOS project harmony in the project using DevEc } ``` -There are currently two methods: + ### 2. There are currently two methods: Import via har package (this method will be deprecated after the IDE improves related functions, and it is the preferred method currently); Link source code directly. @@ -194,7 +199,7 @@ Open the entry/oh-package.json5 file and append the following dependencies: ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-ohos/react-native-turbo-log": "file:../../node_modules/@@react-native-ohos/react-native-turbo-log/harmony/turbo_log.har" + "@react-native-ohos/react-native-turbo-log": "file:../../node_modules/@react-native-ohos/react-native-turbo-log/harmony/turbo_log.har" } ``` @@ -212,7 +217,7 @@ Method 2: Link the source code directly > [!TIP] For direct source code linking, refer to [Direct Source Code Linking Instructions](/zh-cn/link-source-code.md) -### 4.Configure CMakeLists and import turbo_log +### 3.Configure CMakeLists and import turbo_log open entry/src/main/cpp/CMakeLists.txt,add: @@ -260,8 +265,9 @@ target_link_libraries(rnoh_app PUBLIC rnoh_gesture_handler) # RNOH_END: manual_package_linking_2 ``` +### 4.在 ArkTs 侧引入 TurboLogPackage -打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: +open `entry/src/main/cpp/PackageProvider.cpp`,add: ```diff #include "RNOH/PackageProvider.h" diff --git a/zh-cn/react-native-turbo-log.md b/zh-cn/react-native-turbo-log.md index 6841e7d6..a98607af 100644 --- a/zh-cn/react-native-turbo-log.md +++ b/zh-cn/react-native-turbo-log.md @@ -273,6 +273,8 @@ target_link_libraries(rnoh_app PUBLIC rnoh_gesture_handler) ``` +### 4.Import the TurboLogPackage on the ArkTS side + 打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: ```diff -- Gitee From 4b80d7c42fc8fc28250427f6e99705c290ad7772 Mon Sep 17 00:00:00 2001 From: zhouyong <550468167@qq.com> Date: Wed, 17 Dec 2025 15:26:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20[Issue:=20#IDB8P4]=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-turbo-log=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-turbo-log.md | 11 +++-------- zh-cn/react-native-turbo-log.md | 6 ------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/en/react-native-turbo-log.md b/en/react-native-turbo-log.md index 6408ed4c..87f95fe1 100644 --- a/en/react-native-turbo-log.md +++ b/en/react-native-turbo-log.md @@ -164,16 +164,11 @@ const styles = StyleSheet.create({ }); ``` -## Using Codegen -Version >= @react-native-ohos/react-native-turbo-log@0.6.1, which has been adapted to codegen-lib to generate bridge code. - -This library has been adapted to Codegen. Before using it, you need to actively execute the generation of third-party library bridge code. For details, please refer to the [ Codegen Usage Documentation](/en/codegen.md). - ## Link This step is a guide for manually configuring native dependencies. First, you need to open the HarmonyOS project harmony in the project using DevEco Studio. -### 1. Add overrides field to oh-package.json in the project root directory +### Add overrides field to oh-package.json in the project root directory ```json { @@ -185,7 +180,7 @@ First, you need to open the HarmonyOS project harmony in the project using DevEc } ``` - ### 2. There are currently two methods: + ### There are currently two methods: Import via har package (this method will be deprecated after the IDE improves related functions, and it is the preferred method currently); Link source code directly. @@ -265,7 +260,7 @@ target_link_libraries(rnoh_app PUBLIC rnoh_gesture_handler) # RNOH_END: manual_package_linking_2 ``` -### 4.在 ArkTs 侧引入 TurboLogPackage +### 4.Import the TurboLogPackage module on the ArkTS side open `entry/src/main/cpp/PackageProvider.cpp`,add: diff --git a/zh-cn/react-native-turbo-log.md b/zh-cn/react-native-turbo-log.md index a98607af..92bb9c1e 100644 --- a/zh-cn/react-native-turbo-log.md +++ b/zh-cn/react-native-turbo-log.md @@ -166,12 +166,6 @@ const styles = StyleSheet.create({ }); ``` -## 使用 Codegen - -Version >= @react-native-ohos/react-native-turbo-log@0.6.1,已适配codegen-lib生成桥接代码。 - -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 - ## Link 此步骤为手动配置原生依赖项的指导。 -- Gitee