NestJS Schematics #402
Replies: 7 comments 2 replies
-
Hi @tayambamwanza, While it could be possible to implement NestJS support in this extension, it seems there is already another VS Code extension for NestJS: https://marketplace.visualstudio.com/items?itemName=AbhijoyBasak.nestjs-files Doesn't this extension work? (I'm not a NestJS user myself) |
Beta Was this translation helpful? Give feedback.
-
Thanks for bringing it to my attention, I can use it, although it would be nice to have support for it too (instead of two separate extensions), for example under the "Generate another schematic" option. If you feel it's out of scope for this project then that's fine, I'll close the issue. I think Nestjs is a natural back-end for Angular, because the concepts are borrowed from angular (dependency injection, services, modules etc). So i felt it does fit in this project to have the option to generate Nest files too. I would say ~80% of Angular knowledge transfers over to it making it very easy to learn for an Angular dev. This was the video I watched when I first learned of it: Leveraging Angular in Node.js with NestJS by Kamil Mysliwiec |
Beta Was this translation helpful? Give feedback.
-
If the other extension is working well, I would say it may be better to stick to it. I quickly checked, and unfortunately it's more than just adding the
While all of this is technically possible, it would add quite some mess to this extension, which I feel not worth it if there is already another working extension. I won't close the issue but move it to discussions (once it's possible, the feature seems unavailable currently), so other people can give their opinion. |
Beta Was this translation helpful? Give feedback.
-
If it's that much work than I understand, I didn't know the internals too well, i'm ok to just use the other extension. |
Beta Was this translation helpful? Give feedback.
-
I think this is still a valid feature request. The unfortunate part about the other extension is that the user experience is very limited, and for some reason it doesn't add the generated service/controller to the module in the directory I click; It always updates the Another slight inconvenience with the other extension is that it adds all the schematics in the context menu, so every right click on folders has the entire schematics collection options. |
Beta Was this translation helpful? Give feedback.
-
@cyrilletuzi @DavidTheProgrammer I dealt with this by using the option to add additional packages "ngschematics.schematics": [
"@nestjs/schematics"
] It detects the options correctly but for some reason it doesn't pick up the directory structure, this may be another option worth putting as a default, or do you feel it's out of scope because of the different technologies, I haven't faced and serious issues, only as mentioned before, it adds generated components to the wrong app.module. |
Beta Was this translation helpful? Give feedback.
-
NestJS schematics are removed for now. They may be reintroduced later. |
Beta Was this translation helpful? Give feedback.
-
Checks before posting an issue
Configuration
ng version
): 11.0.0Description of the issue
Hi this is more of a feature request than a bug report, I would be willing to assist or even undertake bringing this feature to fruition.
What I am asking is if it would be possible to also have a subset of schematics for generating nestjs files.
In the same way that there is a subset for ionic and material components, there could be a @nestjs/schematics option.
There reason why I feel this feature would be great is because Nestjs is a great back-end framework to use for angular (since it is inspired by it) and is definitely growing in popularity. It may be possible to re-use existing functionality of the extension to hook into the nestjs cli with less effort than if it might have had to be done from scratch.
Beta Was this translation helpful? Give feedback.
All reactions