From 977e710fee04176b32a81437ccd2cd969ea295ab Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 18 Dec 2024 11:40:00 +0800 Subject: [PATCH] update --- index.d.ts | 2 +- index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }