@nx/plugin:migration

Create a Migration for an Nx Plugin.

Usage

1nx generate migration ... 2

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

You can specify the collection explicitly as follows:

1nx g @nx/plugin:migration ... 2
Nx 15 and lower use @nrwl/ instead of @nx/

Show what will be generated without writing to disk:

1nx g migration ... --dry-run 2

Examples

Adds a new migration to the project my-plugin, which will be triggered when migrating to version 1.0.0 or above from a previous version.:

1nx g migration my-migration --project=my-plugin --version=1.0.0 2

Options

project

pRequired
string

The name of the project.

packageVersion

vRequired
string

Version to use for the migration.

name

string

Migration name.

description

string

Migration description.

packageJsonUpdates

p
boolean
Default: false

Whether or not to include package.json updates.

skipLintChecks

boolean
Default: false

Do not eslint configuration for plugin json files.