diff --git a/index.d.ts b/index.d.ts index d255532..8e79cee 100644 --- a/index.d.ts +++ b/index.d.ts @@ -22,7 +22,7 @@ declare module '@gm5/core' { listen(port?: number, callback?: () => void): this } - export function preload(dir?: string): array + export function mount(dir?: string): array export function createApp(conf?: object): Five } diff --git a/index.js b/index.js index 7a8d145..cf26378 100644 --- a/index.js +++ b/index.js @@ -144,7 +144,7 @@ class Five { * @deprecated 请使用use方法, 将在下个版本中移除 */ preload(dir) { - this.#preload(preload(dir)) + this.#preload(mount(dir)) return this } @@ -188,7 +188,7 @@ class Five { } } -export function preload(dir) { +export function mount(dir) { let list = fs.ls(dir) || [] return list }