Motivation

Make it easy to register components. Also via remote URLS, e.g. https://yourfrontend.com/nuxt-components-preview/component-index.json

Proposed resolution

Add JSON schema similar to SDCs, i.e. based upon https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/...

Consider adding UI and drush command for registration

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fago created an issue. See original summary.

fago’s picture

Version: » 1.x-dev
Status: Active » Needs work

I started working on this and pushed some WIP code, it's a first draft.

Disclosure & Note: I used AI to help creating this!

fago’s picture

Status: Needs work » Needs review

this seems ready now!
it already adds drush commands but no ui for now. we can add this in a follow-up then.

fago’s picture

I got i working quite nicely! :-)

Based upon the vue-team supported vue-component-meta package we are able to read most metadata. Generally, it buidls upon the typescript definitons and also supports enums that way. @example and @enum-labels are supported via js-tags. Given that, the generated file is served from nuxt and can be used to easily register files via drush!

https://github.com/drunomics/nuxt-component-preview/releases/tag/1.0.0-a... is released with the new feature.

  • fago committed 4f5e4c36 on 1.x
    [#3549496] feat: Ease registration of components via component index
    
    By...
fago’s picture

Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.