Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest not to register themePath/components by default #877

Closed
meteorlxy opened this issue Sep 27, 2018 · 1 comment
Closed

Suggest not to register themePath/components by default #877

meteorlxy opened this issue Sep 27, 2018 · 1 comment

Comments

@meteorlxy
Copy link
Member

Feature request

For version: 1.0.0-alpha.1

What problem does this feature solve?

All .vue files in themePath/components are registerd as global components by default:

.use('@vuepress/register-components', {
componentsDir: [
path.resolve(this.sourceDir, '.vuepress/components'),
path.resolve(this.themePath, 'components')
]
})

Theme makers may not want to register global components, but still want to have a components dir in the root path of their theme. (As I did in my own theme based on vuepress@0.x)

How should this be implemented in your opinion?

In my opinion, theme makers should use @vuepress/plugin-register-components themselves to control global components registration.

So I propose to remove line 123 above, i.e path.resolve(this.themePath, 'components'), and use another @vuepress/plugin-register-components in @vuepress/theme-default.

Are you willing to work on this yourself?**

Yes if admitted

@ulivz ulivz closed this as completed in 4e8da95 Sep 28, 2018
@ulivz
Copy link
Member

ulivz commented Sep 28, 2018

It makes sense, removed it at 4e8da95.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants