@nrwl/nx-plugin:plugin

Create a Plugin for Nx.

Usage

nx generate plugin ...

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

You can specify the collection explicitly as follows:

nx g @nrwl/nx-plugin:plugin ...

Show what will be generated without writing to disk:

nx g plugin ... --dry-run

Examples

Generate libs/plugins/my-plugin:

g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin

Options

compiler

string
Default: tsc
Accepted values: tsc, swc

The compiler used by the build and test targets.

directory

d
string

A directory where the plugin is placed.

e2eTestRunner

string
Default: jest
Accepted values: jest, none

Test runner to use for end to end (E2E) tests.

importPath

string

How the plugin will be published, like @myorg/my-awesome-plugin. Note this must be a valid NPM name.

linter

Deprecated
string
Default: eslint
Accepted values: eslint, tslint

The tool to use for running lint checks.

TSLint support is deprecated and will be removed

minimal

boolean
Default: false

Generate the plugin with a minimal setup. This would involve not generating a default executor and generator.

name

Required
string

Plugin name

skipFormat

boolean
Default: false

Skip formatting files.

skipTsConfig

boolean
Default: false

Do not update tsconfig.json for development experience.

skipLintChecks

boolean
Default: false

Do not eslint configuration for plugin json files.

standaloneConfig

boolean

Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json.

setParserOptionsProject

boolean
Default: false

Whether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.

tags

t
string

Add tags to the library (used for linting).

unitTestRunner

string
Default: jest
Accepted values: jest, none

Test runner to use for unit tests.