Update FrontEnd.md

This commit is contained in:
Him188 2020-11-21 09:14:27 +08:00 committed by GitHub
parent 94256a4303
commit 5fad5e9337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
Mirai Console 前端开发文档。
[`MiraiConsole`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt
[`MiraiConsole`]: ../backend/mirai-console/src/MiraiConsole.kt
## 实现前端
@ -10,10 +10,8 @@ Mirai Console 前端开发文档。
`build.gradle``build.gradle.kts` 添加:
```kotlin
kotlin {
sourceSets.all {
languageSettings.useExperimentalAnnotation("net.mamoe.mirai.console.ConsoleFrontEndImplementation")
}
kotlin.sourceSets.all {
languageSettings.useExperimentalAnnotation("net.mamoe.mirai.console.ConsoleFrontEndImplementation")
}
```
@ -22,9 +20,9 @@ kotlin {
### 实现 Mirai Console
[`MiraiConsole`] 是后端的公开对象,由 [MiraiConsoleImplementationBridge](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/MiraiConsoleImplementationBridge.kt) 代理,与前端链接。
[`MiraiConsole`] 是后端的公开对象,由 [MiraiConsoleImplementationBridge](../backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt) 代理,与前端链接。
前端需要实现 [MiraiConsoleImplementation.kt](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt)。
前端需要实现 [MiraiConsoleImplementation.kt](../backend/mirai-console/src/MiraiConsoleImplementation)。
由于实现前端需要一定的技术能力,相信实现者都能理解源码内注释。
@ -32,4 +30,4 @@ kotlin {
通过 `public fun MiraiConsoleImplementation.start()`
[MiraiConsoleImplementation.kt: Line 161](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt#L161)
[MiraiConsoleImplementation.kt: Line 161](../backend/mirai-console/src/MiraiConsoleImplementation.kt#L161)