Skip to content

Auto-generate web-types during build #4107

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

Comments

@piotrtomiak
Copy link
Contributor

piotrtomiak commented Sep 16, 2019

Is your feature request related to a problem? Please describe...

JetBrains have developed an open-source format for sharing metadata about web libraries - https://github.com/JetBrains/web-types . It is open and we are working on having a wider IDE support for it (including VSCode).

Describe the solution you'd like

Please include a generation of the web-types file into your build system to have a better code completion experience of bootstrap-vue developers in their IDEs.

Additional context

The format has been/is being included into build systems of Vuetify (vuetifyjs/vuetify#7906) and quasar (quasarframework/quasar#4749)

@tmorehouse
Copy link
Member

There is a published version of BootstrapVue webtypes at:

https://github.com/JetBrains/web-types/tree/master/packages/bootstrap-vue

But it is slightly out of date

@tmorehouse
Copy link
Member

There would be a few issues with defining directives (specifically the modifiers for directives) using the current schema: JetBrains/web-types#6

@piotrtomiak
Copy link
Contributor Author

@tmorehouse Thanks for looking into this so quickly! I am creating those webtypes myself using a generator, but the information is incomplete in some areas, so having web-types shipped with the library and generated with all information available during compile-time would be really great improvement. Please note, that not all of the features specified in schema are supported yet in WebStorm (i.e. filters, documentation, etc.).

@tmorehouse
Copy link
Member

I have a base script that I ma testing this evening to pull in our meta files (each component/directive group has a JSON meta file) for listing the events and slots, while importing the individual component to get access to it's $options.props object for the props definition, and then massage and spew it out to a JSON file.

@piotrtomiak
Copy link
Contributor Author

@tmorehouse Sounds great :) I am going offline now, but if you find any difficulties with the format please let me know and I'll try to answer tomorrow.

@piotrtomiak
Copy link
Contributor Author

@tmorehouse Thank you for including web-types support!

@tmorehouse
Copy link
Member

@piotrtomiak it will be available in release v2.1.0 (coming later this week hopefully)

@piotrtomiak
Copy link
Contributor Author

Awesome :)

@tmorehouse
Copy link
Member

@piotrtomiak BootstrapVue v2.1.0 has been released, which now includes web-types.json in the dist folder.

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