Closed stafyniaksacha closed 2 years ago
Generally LGTM 👍 , but there are some issues we should deal with:
TestComponent
), all props are marked as requiredAlso, I would love to have @kevinmarrec review, about the schema and possible breaking changes for the editor.
- Default values of props are missing
- In normal components(
TestComponent
), all props are marked as required
Should be resolved with https://github.com/johnsoncodehk/volar/pull/1665
@kevinmarrec @farnabaz ; could we state on this PR quickly?
I would love to see this happen to iterate on Studio Elements components documentation we're building.
Everything looks good to me, The only remaining thing is the tests. @stafyniaksacha Do you mind updating tests?
Everything looks good to me, The only remaining thing is the tests. @stafyniaksacha Do you mind updating tests?
Yep, I'm on it.
I've found that the library is not able to load components from node_modules
(this affects autoloaded components library)
I don't know if this is a required feature for now, but I think this will be fixed upstream on vue-component-meta
Hey @stafyniaksacha ; noticed some changes 😄
Is this PR ready for review again?
I'm willing to have this ASAP for usage in multiple Nuxt packages, that work is amazing!
Hey @Tahul ! Yes pretty much ready, waiting on next release of vue-component-meta, so we can get rid of tsconfig.json
that is required now.
https://github.com/johnsoncodehk/volar/blob/master/packages/vue-component-meta/tests/index.spec.ts#L684-L693
This is why the tests are failing, we can not create one in tests/fixtures/base
because @nuxt/test-utils
will create a random folder under .nuxt
{
"extends": "./.nuxt/random-xxx/tsconfig.json"
}
https://github.com/nuxt/framework/blob/main/packages/test-utils/src/nuxt.ts#L42
Hey @Tahul @farnabaz That's should be ready ;)
⚠️ This introduces breaking change in schemas (more details here)
This is the first implementation of vue-component-meta to extract
props
/events
/slots
/exposed
using typescript vue language service parser fromvolar
- replaces #23It can force usage of typescript in javascript components (thanks that vue3 is written in typescript) so detection work, but it needs a
tsconfig.json
in the root of the project. (can be achieved within vue-component-meta)#nuxt-component-meta
virtual module is exposed, so we can use meta inside the project without using a$fetch
(useful to create components documentation) - replaces #32