storybook-vue-addon
storybook-vue-addon copied to clipboard
feat: export Story and Stories components from `/core`
Codecov Report
Merging #84 (060ba8c) into main (fb512c8) will not change coverage. Report is 1 commits behind head on main. The diff coverage is
n/a.
@@ Coverage Diff @@
## main #84 +/- ##
=======================================
Coverage 93.62% 93.62%
=======================================
Files 3 3
Lines 345 345
Branches 55 55
=======================================
Hits 323 323
Misses 22 22
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@floroz Does this look good to you?
With a fresh look after some time, I came to the conclusion that it doesn't really make sense at the moment to really ship vue components. The way the vite plugin works currently (and in the foreseeable future) is that both Stories and Story are essentially wrappers that are stripped away, and only their inner template is actually used. So there is no real value in trying to properly implement these components in vue. The only thing we care about are the types, so we can also manually create and export them.
However, declaring the components in vue can aide in creating the proper type annotations (especially once they become a bit more complex with proper args and slots annotations). Thus, I left the infrastructure of this PR in place, but degraded it to be a tool during development.
I liked the idea to move the Story/Stories components to core. This will also give us the flexibility to revisit the vue-implementation idea in the future.
Thanks @floroz for the valuable discussion!