Skip to content

Commit

Permalink
fix(vuepress): manually declare all exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 24, 2024
1 parent 8b5eed3 commit c6f5135
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 24 deletions.
18 changes: 1 addition & 17 deletions packages/core/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {
export type {
HeadAttrsConfig,
HeadConfig,
HeadTag,
Expand All @@ -12,22 +12,6 @@ import type {
SiteData,
SiteLocaleConfig,
} from '@vuepress/shared'

export type {
HeadConfig,
HeadTag,
HeadTagEmpty,
HeadTagNonEmpty,
HeadAttrsConfig,
LocaleConfig,
LocaleData,
PageData,
PageFrontmatter,
PageHeader,
SiteData,
SiteLocaleConfig,
}

export * from './app/index.js'
export * from './bundler.js'
export * from './page.js'
Expand Down
24 changes: 23 additions & 1 deletion packages/vuepress/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
export * from '@vuepress/cli'
export {
type BuildCommand,
type BuildCommandOptions,
type DevCommand,
type DevCommandOptions,
type UserConfig,
cli,
createBuild,
createDev,
defineUserConfig,
handlePageAdd,
handlePageChange,
handlePageUnlink,
info,
loadUserConfig,
resolveAppConfig,
resolveCliAppConfig,
resolveUserConfigConventionalPath,
resolveUserConfigPath,
transformUserConfigToPlugin,
watchPageFiles,
watchUserConfigFile,
} from '@vuepress/cli'
2 changes: 1 addition & 1 deletion packages/vuepress/src/client-app.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from '@vuepress/client/app'
export { createVueApp } from '@vuepress/client/app'
59 changes: 58 additions & 1 deletion packages/vuepress/src/client.ts
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
export * from '@vuepress/client'
export {
type ClientConfig,
ClientOnly,
Content,
type CreateVueAppFunction,
type Layouts,
type LayoutsRef,
type PageData,
type PageDataRef,
type PageFrontmatter,
type PageFrontmatterRef,
type PageHead,
type PageHeader,
type PageHeadRef,
type PageHeadTitle,
type PageHeadTitleRef,
type PageLang,
type PageLangRef,
type PageLayoutRef,
type PageRouteItem,
type PagesData,
type PagesDataRef,
type RouteLocale,
type RouteLocaleRef,
type SiteData,
type SiteDataRef,
type SiteLocaleData,
type SiteLocaleDataRef,
type UpdateHead,
defineClientConfig,
layoutsSymbol,
pageDataEmpty,
pageDataSymbol,
pageFrontmatterSymbol,
pageHeadSymbol,
pageHeadTitleSymbol,
pageLangSymbol,
pageLayoutSymbol,
pagesData,
resolvers,
routeLocaleSymbol,
siteData,
siteLocaleDataSymbol,
updateHeadSymbol,
useLayouts,
usePageData,
usePageFrontmatter,
usePageHead,
usePageHeadTitle,
usePageLang,
usePageLayout,
usePagesData,
useRouteLocale,
useSiteData,
useSiteLocaleData,
useUpdateHead,
withBase,
} from '@vuepress/client'
95 changes: 94 additions & 1 deletion packages/vuepress/src/core.ts
Original file line number Diff line number Diff line change
@@ -1 +1,94 @@
export * from '@vuepress/core'
export {
type AliasDefineHook,
type App,
type AppConfig,
type AppConfigBuild,
type AppConfigCommon,
type AppConfigDev,
type AppDir,
type AppDirFunction,
type AppEnv,
type AppOptions,
type AppWriteTemp,
type BuildApp,
type Bundler,
type ClientConfigFileHook,
type DevApp,
type ExtendsHook,
type HeadAttrsConfig,
type HeadConfig,
type HeadTag,
type HeadTagEmpty,
type HeadTagNonEmpty,
type Hook,
type HookItem,
type HookQueue,
type Hooks,
type HooksExposed,
type HooksName,
type HooksNormalized,
type HooksResult,
type LifeCycleHook,
type LocaleConfig,
type LocaleData,
type Page,
type PageData,
type PageFrontmatter,
type PageHeader,
type PageOptions,
type Plugin,
type PluginApi,
type PluginConfig,
type PluginFunction,
type PluginObject,
type SiteData,
type SiteLocaleConfig,
type Theme,
type ThemeFunction,
type ThemeInfo,
type ThemeObject,
appInit,
appPrepare,
appUse,
createAppDirFunction,
createBaseApp,
createBuildApp,
createDevApp,
createHookQueue,
createPage,
createPluginApi,
createPluginApiHooks,
createPluginApiRegisterHooks,
inferPagePath,
normalizeAliasDefineHook,
normalizeClientConfigFileHook,
prepareClientConfigs,
preparePageComponent,
preparePageData,
preparePagesComponents,
preparePagesData,
preparePagesRoutes,
prepareSiteData,
renderPageContent,
resolveAppDir,
resolveAppEnv,
resolveAppOptions,
resolveAppPages,
resolveAppSiteData,
resolveAppVersion,
resolveAppWriteTemp,
resolvePageComponentInfo,
resolvePageDataInfo,
resolvePageDate,
resolvePageFileContent,
resolvePageFilePath,
resolvePageHtmlInfo,
resolvePageKey,
resolvePageLang,
resolvePagePath,
resolvePagePermalink,
resolvePageRouteMeta,
resolvePageSlug,
resolvePluginObject,
resolveThemeInfo,
} from '@vuepress/core'
31 changes: 30 additions & 1 deletion packages/vuepress/src/markdown.ts
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
export * from '@vuepress/markdown'
export {
type AnchorPluginOptions,
type AssetsPluginOptions,
type CodePluginOptions,
type ComponentPluginOptions,
type EmojiPluginOptions,
type FrontmatterPluginOptions,
type HeadersPluginOptions,
type ImportCodePluginOptions,
type LinksPluginOptions,
type Markdown,
type MarkdownEnv,
type MarkdownHeader,
type MarkdownLink,
type MarkdownOptions,
type MarkdownSlugifyFunction,
type TocPluginOptions,
anchorPlugin,
assetsPlugin,
codePlugin,
componentPlugin,
createMarkdown,
emojiPlugin,
frontmatterPlugin,
headersPlugin,
importCodePlugin,
linksPlugin,
titlePlugin,
tocPlugin,
} from '@vuepress/markdown'
34 changes: 33 additions & 1 deletion packages/vuepress/src/shared.ts
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
export * from '@vuepress/shared'
export {
type HeadAttrsConfig,
type HeadConfig,
type HeadTag,
type HeadTagEmpty,
type HeadTagNonEmpty,
type LocaleConfig,
type LocaleData,
type PageBase,
type PageData,
type PageFrontmatter,
type PageHeader,
type SiteData,
type SiteLocaleConfig,
type SiteLocaleData,
type VuepressSSRContext,
dedupeHead,
ensureEndingSlash,
ensureLeadingSlash,
formatDateString,
isFunction,
isLinkExternal,
isLinkHttp,
isLinkWithProtocol,
isPlainObject,
isString,
omit,
removeEndingSlash,
removeLeadingSlash,
resolveHeadIdentifier,
resolveLocalePath,
resolveRoutePathFromUrl,
} from '@vuepress/shared'
30 changes: 29 additions & 1 deletion packages/vuepress/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
export * from '@vuepress/utils'
export {
TEMPLATE_RENDERER_OUTLETS,
type TemplateRenderer,
type TemplateRendererContext,
colors,
createError,
debug,
error,
formatMs,
fs,
getDirname,
globby,
hash,
importFile,
importFileDefault,
info,
isChildPath,
logger,
ora,
path,
renderHead,
renderHeadAttrs,
sanitizeFileName,
success,
templateRenderer,
tip,
warn,
withSpinner,
} from '@vuepress/utils'

0 comments on commit c6f5135

Please sign in to comment.