question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate web-types for @ionic/vue package

See original GitHub issue

Feature 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:17 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
piotrtomiakcommented, Nov 4, 2020

@liamdebeasi I’ve created a PR with the changes. Please review 😃 The generation code places web-types.json in dist folder, let me know if it should be a different location. I have decided to use docs/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.

0reactions
ionitron-bot[bot]commented, Dec 5, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic Vue Quickstart
Our QuickStart guide covers the basics of both Vue and Ionic Framework global components to get apps up and running. Read how to...
Read more >
Web-types – Filling a Vue Libraries Documentation Gap
Learn why we developed web-types, an open-source standard for documenting web frameworks.
Read more >
Getting Started - BootstrapVue
Get started with BootstrapVue, based on the world's most popular framework - Bootstrap v4, for building responsive, mobile-first sites using Vue.js.
Read more >
@ionic/vue - npm
This will generate Vue component bindings in the packages/vue directory: npm run build. Install dependencies in @ionic/vue :.
Read more >
JetBrains WebStorm on Twitter: "@leereichardt web-types ...
Thanks! To provide code completion for the Ionic components in Vue apps, we need to have metadata for that in the format described...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found