UNPKG

@arms/rum-harmonyos-plugin

Version:

Alibaba Cloud RUM plugin for HarmonyOS applications

56 lines (40 loc) 1.27 kB
# Alibaba Cloud RUM Harmony Plugin This plugin is used to inject Alibaba Cloud RUM monitoring code into HarmonyOS applications. ## Installation 1. Add the plugin to your project's `hvigor/hvigor-config.json5` file: ```json5 { "dependencies": { "@arms/rum-harmonyos-plugin": "^1.0.2" } } ``` 2. Run the following command in your project root directory to sync dependencies: ```bash hvigorw --sync ``` ## Usage 1. Create a configuration file named `alibabaCloudRumConfig.txt` in your project root directory: - `-hook <path>`: Specify the directory or file to be processed - `-keep <path>`: Specify the directory or file to be excluded from processing example: ```text -hook ./src/main/ets/ -keep ./src/main/ets/hook/ ``` 2. Add the plugin to your project's build configuration: ```typescript import { AlibabaCloudRumPlugin } from '@arms/rum-harmonyos-plugin'; // In your build configuration export default { plugins: [ AlibabaCloudRumPlugin() // 注意这里需要调用函数 ] }; ``` ## Configuration The `alibabaCloudRumConfig.txt` file supports the following directives: - `-hook <path>`: Specify the directory or file to be processed - `-keep <path>`: Specify the directory or file to be excluded from processing ## License Apache-2.0