[utility] useHookParams
florian-lefebvre opened this issue · 0 comments
florian-lefebvre commented
I wonder if can add a bit of magic using https://github.com/unjs/unctx, basically a wrapper that puts all those arguments in a context so that inside a utility we can just call
const { command } = useHookParams("astro:config:setup")
and that would even allow us to automatically expose args from previous hooks instead of having a let config: AstroConfig
inside the function body