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

feat(IDE) generate web-types (helper file for WebStorm) #4749

Merged
merged 9 commits into from
Sep 2, 2019

Conversation

panstromek
Copy link
Contributor

@panstromek panstromek commented Jul 27, 2019

Initial work

This PR should improve completion and Quasar support in JetBrains editors. Webstorm already uses those files but JetBrains generates them themselves and publish to @web-types scope. They support linking custom web-types linked through package.json, though.

It would be more appropriate if we generated these files during build so that we don't have to wait until WebStorm team catches up after every release. We can also be responsible for its content and make sure it's correct and complete. We already generate Vetur helpers, that's a similar story.

More information:
https://github.com/JetBrains/web-types/
https://youtrack.jetbrains.com/issue/WEB-31682#focus=streamItem-27-3538850.0-0

@nothingismagick
Copy link
Contributor

AWESOME

@panstromek
Copy link
Contributor Author

panstromek commented Jul 27, 2019

There are problems to solve though:

  • There is no desc of the component itself in the JSON api - only for its props, events etc. This would be useful to add and generate into docs in web-types and Typescript types

  • Links to docs don't have any canonical structure so I can't generate them correctly everytime (this is similar for Typescript definitions, where links to docs could also be nice to have)

    We could either add the link into JSON api or create a canonical link structure (which could just redirect links to corrent pages, so that we don't break existing links on the web).. not sure what's the best option here. Or I can just find a clever way how to pull out links from the docs folder.. seems kinda hacky, though

  • Same problem is with source file links - At least in their case I can look them up in a filesystem during build, though. Not needed anymore

  • Problems I asked Piotr from JetBrains about, I will update the PR based on his response

@lucasfernog
Copy link
Contributor

Doc links on our API was initially done here: #4045

@panstromek panstromek changed the title [WIP] generate web-types (helper file for WebStorm) [WIP] feat(IDE) generate web-types (helper file for WebStorm) Aug 18, 2019
@panstromek
Copy link
Contributor Author

This is ready to merge as initial work.

Some types are a bit lacking but I will need to share code with TypeScript generator to implement them. Since there are already few more pending TypeScript PRs and I don't want to introduce too many conflicts, I will do it after it all get merged.

Other thing missing are docs links - but this question is still unresolved -- see above.

We also need full component/directive descriptions in JSON API - if we then put it in typescript and web-types, WebStorm can display it directly in the IDE which is very handy. In extreme case, we could even show a big part of documentation just on ctrl+q - that would speed up at least my workflow quite a bit 😉

@panstromek panstromek marked this pull request as ready for review August 18, 2019 16:26
@panstromek panstromek changed the title [WIP] feat(IDE) generate web-types (helper file for WebStorm) feat(IDE) generate web-types (helper file for WebStorm) Aug 18, 2019
@rstoenescu rstoenescu merged commit 08abc7d into quasarframework:dev Sep 2, 2019
@rstoenescu
Copy link
Member

Excellent work!!! @panstromek

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

Successfully merging this pull request may close these issues.

4 participants