vuepress / ecosystem

Official plugins and themes for VuePress2
https://ecosystem.vuejs.press
MIT License
20 stars 26 forks source link

`defineXXXConfig` support `MaybeRefOrGetter` options #112

Closed pengzhanbo closed 1 month ago

pengzhanbo commented 1 month ago

Before submitting the PR, please make sure you do the following

What is the purpose of this pull request?

Description

111

Adjust the defineXXXConfig(options) function parameters exported by some plugins, updating the type of the options parameter to MaybeRefOrGetter<XXX>. This allows third parties to have more flexibility in controlling the behavior of the plugins when using them.

plugin-photo-swipe

- export const definePhotoSwipeConfig = (options: PhotoSwipeOptions)
+ export const definePhotoSwipeConfig = (options: MaybeRefOrGetter<PhotoSwipeOptions>)

plugin-docsearch

- export const defineDocSearchConfig = (options: DocSearchClientOptions)
+ export const defineDocSearchConfig = (options: MaybeRefOrGetter<DocSearchClientOptions>)

plugin-comment

I'm not sure if it's necessary to modify the 'defineXXXConfig' exported by the comment plugin, so I haven't made any changes to them.

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 8965168184

Details


Totals Coverage Status
Change from base Build 8965163927: 0.0%
Covered Lines: 698
Relevant Lines: 1255

💛 - Coveralls
Mister-Hope commented 1 month ago

plugin-comment

I'm not sure if it's necessary to modify the 'defineXXXConfig' exported by the comment plugin, so I haven't made any changes to them.

That should be edge cases, we can support that if it would not lead some new issues.

pengzhanbo commented 1 month ago

That should be edge cases, we can support that if it would not lead some new issues.

plugin-comment has also been updated in the same way.