Alternative lookup convention for `ng-add` schematics

Open
#13,026 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

Description

area: @angular/cli feature feature: insufficient votes

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.

Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
16h 35m
Merged PRs (30d)
176

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from angular/angular-cli

All issues in angular/angular-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.