mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-25 11:28:13 +08:00
28 lines
531 B
TypeScript
28 lines
531 B
TypeScript
import type { PlumeThemeOptions } from '../../shared/index.js'
|
|
import { logger } from '../utils/index.js'
|
|
|
|
export function resolveThemeOptions({
|
|
themePlugins,
|
|
plugins,
|
|
hostname,
|
|
configFile,
|
|
cache,
|
|
...localeOptions
|
|
}: PlumeThemeOptions) {
|
|
const pluginOptions = plugins ?? themePlugins ?? {}
|
|
|
|
if (themePlugins) {
|
|
logger.warn(
|
|
`The 'themePlugins' option is deprecated. Please use 'plugins' instead.`,
|
|
)
|
|
}
|
|
|
|
return {
|
|
cache,
|
|
configFile,
|
|
pluginOptions,
|
|
hostname,
|
|
localeOptions,
|
|
}
|
|
}
|