nx/docs/shared/deprecated/angular-schematics-builders.md
Jack Hsu 66eaf2fc74
docs(misc): remove /nx-api pages (#31453)
This PR removes the `/nx-api` pages from `nx-dev`. They are already
redirected from `/nx-api` to either `/technologies` or
`/reference/core-api` URLs.

e.g. `/nx-api/nx` goes to `/reference/core-api/nx` and `/nx-api/react`
goes to `/technologies/react/api`

**Changes**:
- Remove old `nx-api.json` from being generated in
`scripts/documentation/generators/generate-manifests.ts` -- this was
used to generate the sitemap
- Remove `pages/nx-api` from Next.js app since we don't need them
- Remove workaround from link checker
`scripts/documentation/internal-link-checker.ts` -- the angular
rspack/rsbuild and other workarounds are gone now that they are proper
docs in `map.json`
- Update Powerpack/Remote Cache reference docs to exclude API documents
(since they are duplicated in the Intro page) --
`nx-dev/models-document/src/lib/mappings.ts`
- All content in `docs` have been updated with new URL structure

**Note:** Redirects are already handled, and Claude Code was used to
verify the updated `docs/` URLs (see report below). The twelve 404s
links were updated by hand.

## Verification Report

https://gist.github.com/jaysoo/c7863fe7e091cb77929d1976165c357a
2025-06-04 16:57:01 -04:00

2.3 KiB

title description
Angular Schematics and Builders Learn about the deprecation of Angular schematics and builders in Nx 17, and how to handle interoperability between Nx and Angular CLI tools.

Angular Schematics and Builders

As of Nx 17, official Nx plugins no longer export schematics and builders that can be directly consumed by the Angular CLI. Since Angular CLI users are not a large portion of Nx's user base, it made sense to stop maintaining that code.

Currently, the Angular CLI can only run its own schematics and builders. The Nx CLI is still able to directly run any schematics or builders created for the Angular CLI as well as Nx's own generators and executors. The only thing that has changed is that Nx is no longer taking the extra step of converting our own code into a format that the Angular CLI recognizes.

To switch from using the Angular CLI to using the Nx CLI follow the migrating an Angular CLI project to Nx recipe.

Interop between Nx Generators and Angular Schematics

You can wrap any Nx generator with the convertNxGenerator function and re-export it in your own plugin as a schematic. This is helpful if you still want to support the Angular CLI.

To convert an existing Angular Schematic to an Nx Generator, use the wrapAngularDevkitSchematic utility function. This is helpful if you want to programmatically call an Angular Schematic inside of a custom Nx Generator.

Interop between Nx Executors and Angular Builders

You can wrap any Nx executor with the convertNxExecutor function and re-export it in your own plugin as a builder.

There is no existing utility function to convert an Angular Builder to an Nx Executor. If you want to programmatically call an Angular Builder inside of a custom Nx Executor, you can import the Angular Builder into your Nx Executor's implementation and call it directly.