Open tacman opened 2 months ago
I'm really hoping you'll be able to do this. But if not, can you give me some guidance as to how to do this?
I think you should be able to extend with a custom stimulus_controller
function
https://github.com/twigjs/twig.js/wiki/Extending-twig.js#functions
Indeed, that's my plan. A library that exports those 3 functions, then map those by extending twig.
I already do that with another library, it works fine. Do you do freelance work? Because you know stimulus and javascript so well, I'm confident you'd be able to knock it out.
This is really a request for a new package, but I wasn't sure how to contact you directly.
I'd like to be able to use the twig helpers for stimulus in javascript
For example,
All of the tests can be found (in PHP) at https://github.com/symfony/ux/blob/2.x/src/StimulusBundle/tests/Twig/StimulusTwigExtensionTest.php
The PHP code is at https://github.com/symfony/ux/blob/2.x/src/StimulusBundle/src/Dto/StimulusAttributes.php
I posted a job on fiverr requesting this, but this seems like a nice fit with your existing packages (this, stimulus-typescript, the 10 people on earth that use zod with stimulus). Even if you're not a PHP developer, the code is pretty straightforward.
In particular, this could be called from twigjs (https://github.com/twigjs/twig.js/issues/878) but also from anywhere that's rendering html within javascript.
I don't have a huge budget (it's a personal/volunteer project), but I can contribute something financially. I can be reached at tacman@gmail.com to discuss this.
Thanks again for this bundle!