Skip to content

Commit 5e3824e

Browse files
author
linyuan.yang
committed
优化资源
1 parent 26745c6 commit 5e3824e

7 files changed

Lines changed: 12 additions & 27 deletions

File tree

‎packages/app/src/env.d.ts‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎packages/app/src/main.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createApp } from 'vue'
1+
import { mountPlayerApp } from '@nes-emulator/player'
22
import App from './App.vue'
33

4-
createApp(App).mount('#app')
4+
mountPlayerApp(App)

‎packages/player/src/emulator/runner.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference path="../env.d.ts" />
2+
13
/**
24
* NES 运行器:封装 Nostalgist.js(libretro/fceumm wasm 核心)的生命周期与输入。
35
*

‎packages/player/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export { default as ShortcutsPanel } from './components/ShortcutsPanel.vue'
66
export { default as ToolbarMenu } from './components/ToolbarMenu.vue'
77
export { default as PlayerFooter } from './components/PlayerFooter.vue'
88
export { default as PlayerShell } from './components/PlayerShell.vue'
9+
export { mountPlayerApp } from './mount'
910
export { isAndroid, isTauri, pickRomFile, setLastRomName } from './emulator/platform'
1011
export {
1112
useRemoteNav,

‎packages/player/src/mount.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createApp, type Component } from 'vue'
2+
3+
export function mountPlayerApp(rootComponent: Component, selector = '#app') {
4+
return createApp(rootComponent).mount(selector)
5+
}

‎packages/web/src/env.d.ts‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎packages/web/src/main.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createApp } from 'vue'
1+
import { mountPlayerApp } from '@nes-emulator/player'
22
import App from './App.vue'
33

4-
createApp(App).mount('#app')
4+
mountPlayerApp(App)

0 commit comments

Comments
 (0)