feat(theme): export VPButton and VPSponsors (#2767)

pull/2803/head
awkweb 1 year ago committed by GitHub
parent 1f4ae02138
commit 6960ec1cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,10 +14,12 @@ import Layout from './Layout.vue'
// Note: if we add more optional components here, i.e. components that are not // Note: if we add more optional components here, i.e. components that are not
// used in the theme by default unless the user imports them, make sure to update // used in the theme by default unless the user imports them, make sure to update
// the `lazyDefaultThemeComponentsRE` regex in src/node/build/bundle.ts. // the `lazyDefaultThemeComponentsRE` regex in src/node/build/bundle.ts.
export { default as VPButton } from './components/VPButton.vue'
export { default as VPHomeHero } from './components/VPHomeHero.vue' export { default as VPHomeHero } from './components/VPHomeHero.vue'
export { default as VPHomeFeatures } from './components/VPHomeFeatures.vue' export { default as VPHomeFeatures } from './components/VPHomeFeatures.vue'
export { default as VPHomeSponsors } from './components/VPHomeSponsors.vue' export { default as VPHomeSponsors } from './components/VPHomeSponsors.vue'
export { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue' export { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue'
export { default as VPSponsors } from './components/VPSponsors.vue'
export { default as VPTeamPage } from './components/VPTeamPage.vue' export { default as VPTeamPage } from './components/VPTeamPage.vue'
export { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue' export { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue'
export { default as VPTeamPageSection } from './components/VPTeamPageSection.vue' export { default as VPTeamPageSection } from './components/VPTeamPageSection.vue'

@ -17,7 +17,7 @@ import { buildMPAClient } from './buildMPAClient'
// A list of default theme components that should only be loaded on demand. // A list of default theme components that should only be loaded on demand.
const lazyDefaultThemeComponentsRE = const lazyDefaultThemeComponentsRE =
/VP(HomeSponsors|DocAsideSponsors|TeamPage|TeamMembers|LocalSearchBox|AlgoliaSearchBox|CarbonAds|DocAsideCarbonAds)/ /VP(HomeSponsors|DocAsideSponsors|TeamPage|TeamMembers|LocalSearchBox|AlgoliaSearchBox|CarbonAds|DocAsideCarbonAds|Sponsors)/
const clientDir = normalizePath( const clientDir = normalizePath(
path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../client') path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../client')

2
theme.d.ts vendored

@ -3,10 +3,12 @@ import type { DefineComponent } from 'vue'
import { EnhanceAppContext } from './dist/client/index.js' import { EnhanceAppContext } from './dist/client/index.js'
// TODO: add props for these // TODO: add props for these
export const VPButton: DefineComponent
export const VPHomeHero: DefineComponent export const VPHomeHero: DefineComponent
export const VPHomeFeatures: DefineComponent export const VPHomeFeatures: DefineComponent
export const VPHomeSponsors: DefineComponent export const VPHomeSponsors: DefineComponent
export const VPDocAsideSponsors: DefineComponent export const VPDocAsideSponsors: DefineComponent
export const VPSponsors: DefineComponent
export const VPTeamPage: DefineComponent export const VPTeamPage: DefineComponent
export const VPTeamPageTitle: DefineComponent export const VPTeamPageTitle: DefineComponent
export const VPTeamPageSection: DefineComponent export const VPTeamPageSection: DefineComponent

Loading…
Cancel
Save