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

[discussion] Duplicates and rename resource structure command #2636

Closed
1 task done
LeDevNovice opened this issue Jul 7, 2024 · 2 comments
Closed
1 task done

[discussion] Duplicates and rename resource structure command #2636

LeDevNovice opened this issue Jul 7, 2024 · 2 comments
Labels

Comments

@LeDevNovice
Copy link

LeDevNovice commented Jul 7, 2024

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

When I develop NestJS application, I have often the moment where I used nest generate to create a new resources with its module, controller and service structure. But it appears that this new resource is exactly or almost exactly the same than another module of my project.

Describe the solution you'd like

One of my previous solution was to copy and paste a resource folder and manually change all the label where the resource name appear on filename and inside the codebase. But I have tested a bash script that make the works for me automatically and seems to be a good solution personally.

I was wondering if it was possible that I work on a solution where I implement a new command on the cli to have the same logic that in my bash script that I started to work on : https://github.com/LeDevNovice/nestjs-module-cloner

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

The primary purpose of this project is to streamline the process of creating new modules in a NestJS project by duplicating an existing module. This is particularly useful when you have a template module and want to create a new module with similar structure and functionality. It facilitates the duplication and renaming of a module in a NestJS application. It allows you to copy an existing module and update the filenames and content to reflect the new module and resource names.

@LeDevNovice LeDevNovice changed the title [discussion] [discussion] Duplicates and rename resource structure command Jul 7, 2024
@micalevisk
Copy link
Member

To me this is something that you could achieve with a custom angular schematics. Otherwise seems to opinative to be in @nestjs/cli

@kamilmysliwiec
Copy link
Member

Thanks for your suggestion!

There are no plans to implement it in the foreseeable future.

If you think your request could live outside Nest's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

@nestjs nestjs locked and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants