master
yutent 2024-12-18 11:40:00 +08:00
parent b5ffd5572d
commit 977e710fee
2 changed files with 3 additions and 3 deletions

2
index.d.ts vendored
View File

@ -22,7 +22,7 @@ declare module '@gm5/core' {
listen(port?: number, callback?: () => void): this listen(port?: number, callback?: () => void): this
} }
export function preload(dir?: string): array export function mount(dir?: string): array
export function createApp(conf?: object): Five export function createApp(conf?: object): Five
} }

View File

@ -144,7 +144,7 @@ class Five {
* @deprecated 请使用use方法, 将在下个版本中移除 * @deprecated 请使用use方法, 将在下个版本中移除
*/ */
preload(dir) { preload(dir) {
this.#preload(preload(dir)) this.#preload(mount(dir))
return this return this
} }
@ -188,7 +188,7 @@ class Five {
} }
} }
export function preload(dir) { export function mount(dir) {
let list = fs.ls(dir) || [] let list = fs.ls(dir) || []
return list return list
} }