refactor: client 和 system 直接导出,不再使用中间量

This commit is contained in:
unanmed 2025-06-12 16:37:38 +08:00
parent d77918d29c
commit 052a8d224c
4 changed files with 11 additions and 11 deletions

View File

@ -2,12 +2,12 @@
`@motajs/client` 包含多个模块:
- [ClientBase](../motajs-client-base/)
- [`@motajs/client-base`](../motajs-client-base/)
示例:
```ts
import { ClientBase } from '@motajs/client';
import { KeyCode } from '@motajs/client';
const { ClientBase } = Mota.require('@motajs/client');
const { KeyCOde } = Mota.require('@motajs/client');
```

View File

@ -2,16 +2,16 @@
包含两个模块:
- [Action](../motajs-system-action/index.md)
- [UI](../motajs-system-ui/index.md)
- [`@motajs/system-action`](../motajs-system-action/index.md)
- [`@motajs/system-ui`](../motajs-system-ui/index.md)
## 引入示例
```ts
import { Action, UI } from '@motajs/system';
import { gameKey, UIController } from '@motajs/system';
Action.gameKey.register(...);
const myController = new UI.UIController('my-controller');
gameKey.register(...);
const myController = new UIController('my-controller');
```
等效于:

View File

@ -1 +1 @@
export * as Base from '@motajs/client-base';
export * from '@motajs/client-base';

View File

@ -1,2 +1,2 @@
export * as Action from '@motajs/system-action';
export * as UI from '@motajs/system-ui';
export * from '@motajs/system-action';
export * from '@motajs/system-ui';