angular / angular/angular-cli

Alternative lookup convention for `ng-add` schematics

Open
#13,026 3 comments 4 reactions 0 assignees View on GitHub
area: @angular/cli feature feature: insufficient votes
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

It would be nice to be able to externalize schematics from the package specified in the `ng add` command.

`ng add ionic` requires us to include schematics within the `ionic` package itself, which is not ideal for several reasons:
- **Separation of Concerns**. The `ionic` package isn't necessarily for Angular, but `ng add ionic` looks good 👌
- **Complication of the build within our main package.** Including the schematics in our main package would require including _a lot_ of the Angular DevKit into the build.
- **Slow "add".** It requires installing the entire package and all its dependencies (~38M) in a sandbox just to use a few files from the package.

In slack I believe we concluded that the best solution might be to have the `ng-add` field within `package.json` be allowed to point to another package.

Contributor guide

Open the contributing guide

Research direction

Start with the `ng add` command and the `ng-add` field in `package.json`; review how the specified package is currently used for schematics. Done means an `ng-add` entry can point to another package, allowing schematics to be externalized from the package named in the command.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.