Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add parsed hook #29

Merged
merged 3 commits into from
Jul 21, 2022
Merged

feat: add parsed hook #29

merged 3 commits into from
Jul 21, 2022

Conversation

farnabaz
Copy link
Collaborator

nuxt.callHook('meta:component:parsed', {
  meta: {
    name: string
    global: boolean,
    props: [] as ComponentProp[],
    slots: [] as ComponentSlot[]
  },
  path: string,
  source: string
})

@atinux
Copy link
Member

atinux commented Jul 21, 2022

What about component-meta:parsed to keep the name of the module first.

Also what will be the use case?

@farnabaz
Copy link
Collaborator Author

As we discussed with @Tahul, this hook will allow other modules to extend component meta, maybe detecting global features of Nuxt or theme.
He also wanted to detect $theme and $tokens usage for each component

@farnabaz farnabaz merged commit 8ce51dd into main Jul 21, 2022
@farnabaz farnabaz deleted the feat/hook branch July 21, 2022 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants