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

Make router and vuex proper packages #2335

Closed
pksunkara opened this issue Aug 23, 2018 · 5 comments · Fixed by #4242
Closed

Make router and vuex proper packages #2335

pksunkara opened this issue Aug 23, 2018 · 5 comments · Fixed by #4242

Comments

@pksunkara
Copy link
Contributor

What problem does this feature solve?

There's a lot of careful manipulation being done in @vue/cli code because of the above plugins not being proper packages, which we could avoid. Since the implementation of #1202, the format of the above plugins is in a proper plugin format anyway. So, why don't we move them to their own packages in the repo? That way, we could remove all the specialty code written just for these packages.

What does the proposed API look like?

Have 2 new packages @vue/cli-plugin-router, @vue/cli-plugin-vuex

@haoqunjiang
Copy link
Member

I'm reluctant to add two new generator-only plugins.
Even if we do, we should not mess up users' package.jsons; co-existence of @vue/cli-plugin-vuex and vuex would definitely confuse them.
So we'll still need to add some special logic to remove the plugins after generating the necessary files. Does that worth the refactoring?

@pksunkara
Copy link
Contributor Author

So we'll still need to add some special logic to remove the plugins after generating the necessary files. Does that worth the refactoring?

I think yes, because right now the generation is not very consistent and also having these as internal options in cli-service generator is messing with other 3rd party plugins when they are doing this

co-existence of @vue/cli-plugin-vuex and vuex would definitely confuse them.

I actually have no issue about this as an end-user if the cli-plugin-vuex has more helpful commands (like maybe generating a store module etc..)

@haoqunjiang
Copy link
Member

I actually have no issue about this as an end-user if the cli-plugin-vuex has more helpful commands (like maybe generating a store module etc..)

Yeah, definitely worth it if such features implemented.
It's been on my backlog for a while actually. Just haven't got the time to think about the design.

@pksunkara
Copy link
Contributor Author

pksunkara commented Jun 24, 2019

I will work on this and send a PR for the initial packages. Then we can discuss on the features to be implemented after that PR is merged. I am always up for a chat on discord if you need someone to brainstorm with.

@haoqunjiang
Copy link
Member

😀Cool, much appreciated.

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

Successfully merging a pull request may close this issue.

3 participants