@nx/angular:ng-add
Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace. NOTE: Does not work in the --dry-run mode.
The State of JS survey is live, featuring a monorepo tools sectionThe State of JS survey is live, featuring a monorepo tools sectionVote for us
Please do not extend this schema as it is part of Nx internal usage.
Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace. NOTE: Does not work in the --dry-run mode.
This generator is usually used as part of the process of migrating from an Angular CLI Workspace to an Nx Integrated Workspace using npx nx@latest init --integrated.
You can read more about migrating from Angular CLI to Nx here.
1nx generate ng-add ...
2By default, Nx will search for ng-add in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/angular:ng-add ...
2Show what will be generated without writing to disk:
1nx g ng-add ... --dry-run
2Default base branch for affected. NOTE: only used if running the generator in an Angular CLI workspace.
cypressprotractor, cypress, noneTest runner to use for end to end (e2e) tests. NOTE: only used if running the generator in an Nx workspace.
eslinteslint, noneThe tool to use for running lint checks. NOTE: only used if running the generator in an Nx workspace.
csscss, scss, sass, lessThe file extension to be used for style files. NOTE: only used if running the generator in an Nx workspace.
jestkarma, jest, noneTest runner to use for unit tests. NOTE: only used if running the generator in an Nx workspace.
falseSkip installing added packages.
falseSkip formatting files. NOTE: only used if running the generator in an Nx workspace.
falseDo not add dependencies to package.json. NOTE: only used if running the generator in an Nx workspace.
falseDo not add or append ngcc to the postinstall script in package.json. NOTE: only used if running the generator in an Nx workspace.