Generate web-types for @ionic/vue package
See original GitHub issueFeature Request
Ionic version:
[x] @ionic/vue 0.0.x
Feature Request
This is a feature request to include web-types
metadata information with @ionic/vue
library to provide users of WebStorm (and possibly other IDEs in the future) with precise code completion, inspections and documentation for Ionic components.
Preferred Solution
The best solution would be to generate the file based on existing Ionic documentation JSONs during the build process and ship it with the library. This solution has been implemented in quasar
library and are being worked on in vuetify
and bootstrap-vue
. I’ve looked at some of the JSONs generated by ionic documentation and it should be relatively straightforward to transform information to a slightly different format.
I can work on the transformation code itself, but it would be pretty difficult for me to hook into the build process in the correct place, so I need some help from your side, before I can create a PR for this.
Alternatives
It’s difficult for an IDE to analyze contents of compiled Vue library and the quality of code completion, inspection and documentation is pretty poor. web-types
offer excellent opportunity to provide consumers of your library with precise information. It is especially useful for new users of the library as it allows to avoid constant looking into documentation on the web.
Related Code
Here is an example PR from Quasar - https://github.com/quasarframework/quasar/pull/4749
Additional Context
The feature has been requested by one of our users on Twitter: https://twitter.com/leereichardt/status/1165554297225891841
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:17 (14 by maintainers)
Top GitHub Comments
@liamdebeasi I’ve created a PR with the changes. Please review 😃 The generation code places
web-types.json
indist
folder, let me know if it should be a different location. I have decided to usedocs/core.json
as the source as it contains all of the required information to generate web-types and it’s just a matter of translation between two formats.Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.