@nx/plugin:create-package

Create a framework package that uses Nx CLI.

Examples

Create an executable that initializes an Nx workspace with {my-plugin}'s preset:

1nx g @nx/plugin:create-package create-my-plugin --project my-plugin 2
Nx 15 and lower use @nrwl/ instead of @nx/

Usage

1nx generate create-package ... 2

By default, Nx will search for create-package in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

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

Show what will be generated without writing to disk:

1nx g create-package ... --dry-run 2

Options

name

Required
string
Pattern: create-.+|^@.+/create(?:-.+)?

The package name of cli, e.g. create-framework-package. Note this must be a valid NPM name to be published.

project

pRequired
string

The name of the generator project.

compiler

string
Default: tsc
Accepted values: tsc, swc

The compiler used by the build and test targets.

directory

string

A directory where the app is placed.

e2eProject

p
string

The name of the e2e project.

linter

string
Default: eslint
Accepted values: eslint

The tool to use for running lint checks.

projectNameAndRootFormat

string
Accepted values: as-provided, derived

Whether to generate the project name and root directory as provided (as-provided) or generate them composing their values and taking the configured layout into account (derived).

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.

skipFormat

boolean
Default: false

Skip formatting files.