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

[Documentation] Integration with Stimulus missing #37

Open
Nek- opened this issue Apr 15, 2024 · 2 comments
Open

[Documentation] Integration with Stimulus missing #37

Nek- opened this issue Apr 15, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Nek-
Copy link

Nek- commented Apr 15, 2024

Hello,

I'm a big fan of TypeScript, so when I saw I could use this bundle, I tried it! (thanks for the good job so far)

I had no specific issue. But I feel like far too much is missing in the documentation and I found nothing anywhere to fix my issues. So I stopped using it instantly... But I decided to make an issue to help anyone that can to improve things!

  1. There's no guide to switch from the default configuration of Symfony to a TypeScript approach. Therefore translating the existing code may be complicated
  2. There's no guide on how to include new Types, and since Stimulus and Stimulus-Bundle types are not included, it does not work by default - with no info about it (I may have done something wrong, but I have no idea, I rely on PHPStorm red flags everywhere!)
  3. An example of controller using TypeScript would be nice as well, and at least a link to this documentation: https://stimulus.hotwired.dev/reference/using-typescript
  4. The suggested configuration (subfolder named typescript) does not work well with the default Symfony configuration, specifying that no configuration is required by default and it will look for the assets folder would be nice I think.

With the hope I help!

@maelanleborgne
Copy link
Contributor

Hi and thanks for opening this issue.
I don't understand some of your points though, and I have the feeling that there might be a misunderstanding on what this bundle does : It is not a way to integrate with stimulus or live components. All it does is help you build your TypeScript files and expose the generated files through AssetMapper. Right now I don't intend to change the scope of the bundle, but I get that some people might want to use TypeScript with Stimulus.
If you feel like documenting your process of converting your Stimulus controllers to TypeScript, I'd be glad to add this as a new section in the documentation. I'm sure there is plenty of things that would be valuable to include in the documentation, and PR are very much appreciated :)

@tacman
Copy link

tacman commented Apr 20, 2024

Indeed, this would be welcomed, in fact that's the exact reason I'm looking at this bundle.

On a related note, I only run asset-map:compile on deployment, on the production server. Reading the documentation, I'm not sure if I need to install this bundle in production (so the typescript files compile) or if I can run it in dev and check in the compiled js, and then continue to run the :compile command on production, without needing typescript.

@maelanleborgne maelanleborgne added enhancement New feature or request help wanted Extra attention is needed labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants