@nrwl/angular
The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides:
-
Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Cypress, Karma, and Protractor.
-
Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm)
-
Upgrading AngularJS applications
-
Single Component Application Modules (SCAMs)
-
NgRx helpers.
-
Utilities for automatic workspace refactoring.
Here is a list of all the executors and generators available from this package.
Executors
Delegates the build to a different target while supporting incremental builds.
Builds a library with support for incremental builds.
Builds and packages an Angular library to be distributed as an NPM package. It supports incremental builds.
The
webpack-browser
executor is very similar to the standardbrowser
builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences:- Supports Custom Webpack Configurations
- Supports Incremental Building
The
webpack-server
executor is very similar to the standarddev-server
builder provided by the Angular Devkit. It is usually used in tandem with@nrwl/angular:webpack-browser
when your Angular application uses a custom webpack configuration.
Generators
Adds linting configuration to an Angular project.
Creates an Angular application.
Generate an Angular Component.
Creates a Cypress spec for a UI component that has a story.
Creates a stories.ts file for a component.
Converts a project from TSLint to ESLint.
Sets up a Downgrade Module.
Initializes the
@nrwl/angular
plugin.Adds Karma configuration to a workspace.
Adds Karma configuration to a project.
Creates an Angular library.
Creates a secondary entry point for an Angular publishable library.
Generate a Remote Angular Micro-Frontend Application.
Moves an Angular application or library to another folder within the workspace and updates the project configuration.
Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met:
- Is either a host or remote application
- Shared npm package configurations have not been modified
- Name used to identify the Micro Frontend application matches the project name
Note: This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!
Generate a Host Angular Micro Frontend Application.
Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace.
Adds NgRx support to an application or library.
Generate a component with an accompanying Single Component Angular Module (SCAM).
Generate a directive with an accompanying Single Component Angular Module (SCAM).
Generate a pipe with an accompanying Single Component Angular Module (SCAM).
Generate a Module Federation configuration for a given Angular application.
Configures Tailwind CSS for an application or a buildable/publishable library.
Creates stories/specs for all components declared in a project.
Adds Storybook configuration to a project.
storybook-migrate-defaults-5-to-6
Generates default Storybook configuration files using Storybook version
>=6.x
specs, for projects that already have Storybook instances and configurations of versions<6.x
.storybook-migrate-stories-to-6-2
Migrates stories to match the new syntax in
v6.2
where the component declaration should be in the default export.Sets up an Upgrade Module.
Creates a Web Worker.