@nrwl/react:setup-tailwind

Adds the Tailwind CSS configuration files for a given React project and installs, if needed, the packages required for Tailwind CSS to work.

Usage

nx generate setup-tailwind ...

By default, Nx will search for setup-tailwind in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/react:setup-tailwind ...

Show what will be generated without writing to disk:

nx g setup-tailwind ... --dry-run

Examples

Initialize Tailwind configuration for the my-app project.:

nx g setup-tailwind --project=my-app

Options

buildTarget

string
Default: build

The name of the target used to build the project. This option is not needed in most cases.

project

pRequired
string

The name of the project to add the Tailwind CSS setup for.

skipFormat

boolean

Skips formatting the workspace after the generator completes.

skipPackageJson

boolean
Default: false

Do not add dependencies to package.json.