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

Feature Request: Create Vue CLI plugin #4

Open
jackkoppa opened this issue Dec 2, 2019 · 5 comments

Comments

@jackkoppa
Copy link

@jackkoppa jackkoppa commented Dec 2, 2019

We love the beta so far! Improves so much of our workflow @ Politico. Our shared components are written in Vue, which Storybook does a great job of supporting. We wanted to check if there are any plans to create the Vue equivalent for @zeplin/cli-connect-react-plugin. In the documentation that comes through on NPM, it looks like custom plugins will be supported, though the associated repo appears to still be private (totally understandable). We'd love the "snippets in Zeplin" benefit, and our CI pipeline is already setup well to add that step to keep them up-to-date.

If there are already plans for a Vue plugin, is there anything we can help contribute to?

@borulday

This comment has been minimized.

Copy link
Member

@borulday borulday commented Dec 6, 2019

Hi @jackkoppa! Thanks for your kind words 🙌 Zeplin CLI and the plugins will be open-source and Zeplin CLI will support custom plugins as you already realized. In the short-term, we aim that developers who love Zeplin create some plugins for the community's needs. So, we're completely open-minded about getting some help--even more than help! 😄

Since you already talked about all these with my teammate from Zeplin support I want to keep the explanation short. 😅

As I know, my teammate shared with you Zeplin React plugin and a plugin template to help you while building a Vue plugin. If you need any help just let us know!

@jackkoppa

This comment has been minimized.

Copy link
Author

@jackkoppa jackkoppa commented Dec 6, 2019

Sounds great! Yup, thanks @borulday, I'll be giving the Vue plugin at least an initial shot, and will check in with questions 👍

@jackkoppa

This comment has been minimized.

Copy link
Author

@jackkoppa jackkoppa commented Dec 6, 2019

Hi @borulday - it's been refreshingly simple! Thanks for the great docs. A basic version is working here: GitHub, npm

No complaints so far, and it might honestly work well enough for us. I'll probably add handling for Vue <slots> and maybe @events, which are both documented by the vue-docgen-api that makes this very easy. I'll raise one issue in this repo; we'd prefer to use PrismLang.HTML over PrismLang.JSX to describe Vue templates, but it looks like Zeplin doesn't yet do syntax highlighting for things described as HTML?

Thanks again - looks like you've got a great ecosystem on your hands 🙌

@yuqu

This comment has been minimized.

Copy link
Collaborator

@yuqu yuqu commented Dec 6, 2019

@jackkoppa Great work! 🎉

I'm surprised that HTML syntax highlighting is not working. There might be an issue on the client app, or maybe the constant defined on PrismLang enum is wrong somehow. We're are going to investigate it. In the meantime, could you try it with PrismLang.Markup and see if that works?

We would appreciate if you have any ideas or feedbacks to expand the capabilities of the plugin interface.

@jackkoppa

This comment has been minimized.

Copy link
Author

@jackkoppa jackkoppa commented Dec 6, 2019

Thanks @yuqu - PrismLang.Markup seems to work perfectly. No concerns about just sticking with that; covers all the syntax that we'd be interested in for #6

And yup, will certainly let you know if there are any issues I run into; it's quite nice in that the info you need to expose is pretty limited, so long as we can get the file path of the component. description, lang, and snippet all seem to be working as I'd expect.

For now, I published an initial 0.1.0 version on npm; seems to work well enough that people could make initial use of it. Wonderfully quick, that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.