-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add Vue 3 code generator with Typescript #371
Conversation
Thanks @kgrandemange for the insights.
We will temporarily provide both files (JS and TS). In the near future, will be adding on a drop down list in the editor tabs to provide various options for a particular file. However, I am wondering that if Vue v2 and v3 shares a lot in common, may be we should just use the existing Vue package and add TS code to it. What do you think? Also, would it possible to also add the Stackblitz export support (check these examples)? |
They share the same code for Javascript example but for Typescript it's different. IMO we can add Vue 2 with JS and TS and Vue 3 with JS and TS. Actually 4 tabs and in the near future 2. I think we can use a new package for Vue 3 but merge the functions that need it (including react and stencil). I need your help to do this properly.
Yes i missed it... 🧐 |
Could you elaborate?
Sure 👍 |
When I wrote the Vue 3 Code i used the Vue 2 code. And i saw React and Stencil shared the same code. For example : https://github.com/xlayers/xlayers/blob/main/libs/react-codegen/src/lib/react-aggregator.service.ts#L88 |
Hi @kgrandemange, could you merge the changes from Thanks |
Nx Cloud ReportCI ran the following commands for commit 395cdbd. Click to see the status, the terminal output, and the build insights.
Sent with 💌 from NxCloud. |
HI @kgrandemange, could you rebase your changes just once more? I've made some changes to our CI pipeline and I'm seeing errors now that I wouldn't expect. |
HI @kgrandemange, could you provide me an update on this PR? if you need help just let me know I can assist you if needed. |
Hi @Jefiozie I added the Stackblitz files. I copied Vue 2 example and updated it to Vue 3. I don't know how to test because Stackblitz button is disable for Vue 2. And I don't know if i must change this lines: |
Hi @kgrandemange, thank you for the update. If you look at this file here we look at a specific Codegen and based on that get some extra configuration parameters, like the one you need to enable Stackblitz. Is this something you are willing to implement in this PR? It isn't that much more I believe so I could wait for that before I review it? |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Add Vue 3 Code generator with Typescript.
What is the current behavior?
Issue Number: 362
What is the new behavior?
Does this PR introduce a breaking change?
Other information
I don't know how you want to show the Vue 3 code with and without Typescript. I only added the Typescript version.
But, you use the Option API on Vue 2 and it still available on Vue 3. Your component are "simple presentation components" (ie: you don't use something like v-model, ...) so your Vue 2 code is still valid on Vue 3.
PS: In a new PR i think we can refactor react, stencil, vue and vue 3 generator. They contains a lot of shared code.