Nx: Is there option to rename generated app and all files that depend on it?

Created on 28 Oct 2019  路  6Comments  路  Source: nrwl/nx

  • [y] I am running the latest version
  • [y] I checked the documentation and found no answer
  • [y ] I checked to make sure that this issue has not already been filed
  • [y] I'm reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

I would like to know that is there option in nx workspace that previously generated app can be renamed? So i don't have to go manually into all files that depend upon that app.

community core feature

Most helpful comment

Wow...I've only just seen that I was assigned to this, sorry!

@NakedFool - Hopefully the new mv schematic in 8.12 should fulfil this requirement, so I'm going to close this issue as a result.

nx g @nrwl/angular:mv --project my-project --destination my-renamed-project

See the blog for more.

@asherccohen - We are going to work on a similar rm/remove schematic for the next release (by "we" I mean me here)

All 6 comments

There is not but I could see this being useful. Would someone from the community be interested in tackling this?

I think the user would do:

ng generate @nrwl/workspace:rename-project project-name-1 project-name-2

Yes, that would be cool feature!

Looking forward for more people activating in this! :)

I also suggest a remove command if possible.

Wow...I've only just seen that I was assigned to this, sorry!

@NakedFool - Hopefully the new mv schematic in 8.12 should fulfil this requirement, so I'm going to close this issue as a result.

nx g @nrwl/angular:mv --project my-project --destination my-renamed-project

See the blog for more.

@asherccohen - We are going to work on a similar rm/remove schematic for the next release (by "we" I mean me here)

@jdpearce hey man, just dropping by to ask if there's anything similar for other app/library types?

F.E if I used nx g @nrwl/node:lib my-lib and I would like to rename my-lib to their-lib? 馃槄

@gioragutt The @nrwl/angular:mv schematic actually depends on a very generic @nrwl/workspace:mv schematic, so you can just use that one instead - e.g. nx g @nrwl/workspace:mv --project my-lib --destination their-lib

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elliotmendiola picture elliotmendiola  路  3Comments

ZempTime picture ZempTime  路  3Comments

SWGeekPD picture SWGeekPD  路  3Comments

joelmuskwe picture joelmuskwe  路  3Comments

vimalraj-a picture vimalraj-a  路  3Comments