Reads lib/shadix/cn.ex, lib/shadix/form.ex, and all
lib/shadix/components/*.ex, then writes priv/registry/<name>.json
(one per component, plus one each for cn and form).
Hooks and npm_deps are auto-detected by convention:
- Any
phx-hook="ShadixFoo"in a component's source implies a hook whose TypeScript source lives atassets/ts/<snake>.ts(where<snake>is the underscored form ofFoo, e.g.ShadixDropdownMenu→dropdown_menu.ts). - npm_deps are inferred by scanning each detected hook's
.tscontent for bare package imports (from "<pkg>"where<pkg>doesn't start with.or/).
Adding a new component with a hook requires no changes here — just place the
.ex file and the matching assets/ts/<snake>.ts.
Usage
mix shadix.gen.registryOptions
--out— override the output directory (default:priv/registry)