Skip to content

Commit

Permalink
feat(theme): export VPButton and VPSponsors (#2767)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Aug 15, 2023
1 parent 1f4ae02 commit 6960ec1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/client/theme-default/without-fonts.ts
Expand Up @@ -14,10 +14,12 @@ import Layout from './Layout.vue'
// 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
// 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 VPHomeFeatures } from './components/VPHomeFeatures.vue'
export { default as VPHomeSponsors } from './components/VPHomeSponsors.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 VPTeamPageTitle } from './components/VPTeamPageTitle.vue'
export { default as VPTeamPageSection } from './components/VPTeamPageSection.vue'
Expand Down
2 changes: 1 addition & 1 deletion src/node/build/bundle.ts
Expand Up @@ -17,7 +17,7 @@ import { buildMPAClient } from './buildMPAClient'

// A list of default theme components that should only be loaded on demand.
const lazyDefaultThemeComponentsRE =
/VP(HomeSponsors|DocAsideSponsors|TeamPage|TeamMembers|LocalSearchBox|AlgoliaSearchBox|CarbonAds|DocAsideCarbonAds)/
/VP(HomeSponsors|DocAsideSponsors|TeamPage|TeamMembers|LocalSearchBox|AlgoliaSearchBox|CarbonAds|DocAsideCarbonAds|Sponsors)/

const clientDir = normalizePath(
path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../client')
Expand Down
2 changes: 2 additions & 0 deletions theme.d.ts
Expand Up @@ -3,10 +3,12 @@ import type { DefineComponent } from 'vue'
import { EnhanceAppContext } from './dist/client/index.js'

// TODO: add props for these
export const VPButton: DefineComponent
export const VPHomeHero: DefineComponent
export const VPHomeFeatures: DefineComponent
export const VPHomeSponsors: DefineComponent
export const VPDocAsideSponsors: DefineComponent
export const VPSponsors: DefineComponent
export const VPTeamPage: DefineComponent
export const VPTeamPageTitle: DefineComponent
export const VPTeamPageSection: DefineComponent
Expand Down

0 comments on commit 6960ec1

Please sign in to comment.