Split `angular.json` into multiple files

Open
#22,655 6 comments 73 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the existing angular.json structure and the Angular CLI commands marked as relevant: new, build, serve, test, e2e, generate, lint, and run. Trace how these commands consume the workspace configuration, then define support for separate project files with behavior matching the requested NX-style layout.

Written by the indexing model from the issue text.

Description

area: @angular-devkit/core area: @angular/cli feature feature: under consideration

🚀 Feature request

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc
Description

I have a monorepository and I want to split my angular.json into separate files.

So that I can have something like this:

{
  "version": 2,
  "projects": {
    "module-auth": "packages/auth",
    "module-core": "packages/core",
    "module-button": "packages/button"
  }
}

After working with NX I noticed that with Lerna and the usual setup my angular.json file has 119 lines of code even though I basically have an empty repository. I believe that having a single angular.json file is a very bad idea, especially for bigger monorepositories or UI libraries.

Describe the solution you'd like

Make the JSON configuration 1:1 with what NX does or implement similar functionality.

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.