workspace move is aggres…

1 minute read

workspace:move is aggressive in renaming stuff in code

Responses:

Is it? I have never noticed it renaming things other than the tsconfig imports (and if the module name changed). If anything I have found it hasn’t been aggressive enough.

If you rename a project like ‘Story’ to Story2 – it renames all kinds of things like ‘StoryFacade’ to ‘Story2Facade’

also if you have closely named things like ‘Story’ and ‘story-session’ renaming story will rename items from story-session

even renames components in angular app that are not part of moved library – such as ‘StoryListItemComponent’ to ‘Story2ListItemComponent’

perhaps I am doing something incorrectly.

How about your e2e folders, files, and configurations in the .json files? When I used this command, nx set my e2e configs as app2-e2e-e2e

I havent tried renaming an app or e2e

got it. I think when it renames, it basically moves it to the new name location.

doing more than that :slightly_smiling_face:

or i’m somehow hitting a different schematic.

I believe i used the nx g @nrwl/angular:mv by @jdpearce which sadly is not in this channel

i usually just go yarn nx g move

nx g move is the angular move schematic for me – and that one is the one causing trouble

nx g @nrwl/workspace:move behaves as expected

thx guys – getting good results now

:+1:

well – it still is NOT nice about overlapping names.

@scope/test and @scope/test-whatever – you cant move @scope/test first.

What are you trying to do? Are you moving workspaces?

no just renaming some things and finding some issues along the way.

I have gotten around them by renaming in certain order

The thing with nx is the conf files. Hope you can rename everything and avoid running into compiling or performance issues later on.

yes no worries

Updated: