Closed weaverryan closed 2 years ago
Right now, the UX controller names have the form symfony/ux-typed/typed (well, technically symfony--ux-typed--typed, but stimulus_controller() normalizes for you).
symfony/ux-typed/typed
symfony--ux-typed--typed
stimulus_controller()
Anyways, most UX components only ship with 1 controller... and symfony/ux-typed/typed seems unnecessarily long. This PR allows for a package to define a controller called default in its package.json - e.g. right here: https://github.com/symfony/ux/blob/09c9effcc2582d4de0907c9e12c35afa313433ae/src/Typed/Resources/assets/package.json#L8
default
When this happens, the final package name would be just the package name: symfony/ux-typed
symfony/ux-typed
Cheers!
Right now, the UX controller names have the form
symfony/ux-typed/typed
(well, technicallysymfony--ux-typed--typed
, butstimulus_controller()
normalizes for you).Anyways, most UX components only ship with 1 controller... and
symfony/ux-typed/typed
seems unnecessarily long. This PR allows for a package to define a controller calleddefault
in its package.json - e.g. right here: https://github.com/symfony/ux/blob/09c9effcc2582d4de0907c9e12c35afa313433ae/src/Typed/Resources/assets/package.json#L8When this happens, the final package name would be just the package name:
symfony/ux-typed
Cheers!