@nx/angular:setup-tailwind

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

Examples

The setup-tailwind generator can be used to add Tailwind configuration to apps and publishable libraries.

To generate a standard Tailwind setup, just run the following command.

1nx g @nx/angular:setup-tailwind myapp 2

Usage

1nx generate setup-tailwind ... 2

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

You can specify the collection explicitly as follows:

1nx g @nx/angular:setup-tailwind ... 2

Show what will be generated without writing to disk:

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

Options

project

Required
string

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

buildTarget

string
Default: build

The name of the target used to build the project. This option only applies to buildable/publishable libraries.

stylesEntryPoint

string

Path to the styles entry point relative to the workspace root. If not provided the generator will do its best to find it and it will error if it can't. This option only applies to applications.

skipFormat

Internal
boolean

Skips formatting the workspace after the generator completes.

skipPackageJson

Internal
boolean
Default: false

Do not add dependencies to package.json.