@nrwl/workspace:move

Move a project to another folder in the workspace.

Usage

nx generate move ...
nx g mv ... #same

By default, Nx will search for move in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/workspace:move ...

Show what will be generated without writing to disk:

nx g move ... --dry-run

Examples

Move libs/my-feature-lib to libs/shared/my-feature-lib:

nx g @nrwl/workspace:move --project my-feature-lib --destination shared/my-feature-lib

Options

destination

Required
string

The folder to move the project into.

projectName

projectRequired
string

The name of the project to move.

destinationRelativeToRoot

boolean
Default: false

If true, the provided destination route is relative to the workspace root.

importPath

string

The new import path to use in the tsconfig.base.json.

newProjectName

string

The name for the project after moving. Overrides the new inferred name if provided.

updateImportPath

boolean
Default: true

Should the generator update the import path to reflect the new location?

skipFormat

boolean
Default: false

Skip formatting files.