perf(theme): 改进类型

This commit is contained in:
pengzhanbo 2024-07-11 05:13:57 +08:00
parent 329049ec55
commit 1ef9744e04
3 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,7 @@ export async function findConfigPath(app: App, configPath?: string): Promise<str
}
}
extensions.forEach((ext) => {
paths.push(resolve(cwd, `./${configPath}.${ext}`))
paths.push(resolve(cwd, `./${CONFIG_FILE_NAME}.${ext}`))
paths.push(resolve(cwd, `${source}/${CONFIG_FILE_NAME}.${ext}`))
paths.push(resolve(cwd, `./.vuepress/${CONFIG_FILE_NAME}.${ext}`))
})

View File

@ -7,3 +7,4 @@ export * from './sidebar.js'
export * from './navbar.js'
export * from './notes.js'
export * from './auto-frontmatter.js'
export * from './theme-data.js'

View File

@ -40,7 +40,7 @@ export interface PlumeThemeOptions extends PlumeThemeLocaleOptions {
export type PlumeThemeLocaleOptions = PlumeThemeData
export type PlumeThemeData = PlumeThemeLocaleData & {
locales?: LocaleConfig<Omit<PlumeThemeLocaleData, 'blog'>>
locales?: LocaleConfig<Omit<PlumeThemeLocaleData, 'blog' | 'article'>>
}
export * from './locale.js'