JetBrains / web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
Apache License 2.0
279 stars 25 forks source link

How to add web-types to package.json exactly? #11

Closed m-thomson closed 4 years ago

m-thomson commented 4 years ago

I might be missing something but how exactly is one supposed to add web-types to package.json?

The docs only say:

link them through web-types property in package.json

But that's not clear to me. Should the property be an array or an object? Should the value(s) point to the web-type definition folder, its package.json file, its *.web-types.json file? Where?

Please provide an example. Thanks.

piotrtomiak commented 4 years ago

@m-thomson Thanks for feedback. I've updated documentation. Let me know if something is still unclear!

m-thomson commented 4 years ago

Great, thanks for the quick response. Do you know if anyone is working on web-types for https://vue.ant.design ?

I'd be happy to contribute.

piotrtomiak commented 4 years ago

I've had a look at their repo https://github.com/vueComponent/ant-design-vue and it doesn't seem there is any active or closed PR with generation of web-types. I think it's best to include web-types generation into the library build process, similarly to how it's done for quasar-framework and others, so I would advise creating an issue and/or PR there.

If you wish to contribute web-types for older versions of the library as well, feel free to create PR here and I will publish files.

piotrtomiak commented 4 years ago

@m-thomson I've created an issue in vue-ant-design repository to create web-types for the package. Feel free to comment there.