angular.json: The Angular Workspace – part 1

When Angular 6 debuted last month it replaced the old angular-cli.json file with the new angular.json file, aka the Angular Workspace file.

The Angular Workspace is an attempt by the Angular team to consolidate and streamline configuration. The Angular team chose to change the angular-cli.json file because the Angular CLI underwent a major rewrite (it was broken up into sub-projects and rebuilt on schematics). Both changes lay the groundwork for new features coming down the pipeline.

Upgrading an existing project is painless. Just run ng update @angular/cli. This will create a new angular.json file and migrate your existing settings from angular-cli.json.

Creating a new project is also painless. Just run ng new my-new-project. This will create a new angular.json file with a default configuration.

Make sure you are running the latest version of the CLI by running:

  • npm uninstall -g @angular/cli
  • npm install -g @angular/cli

Over the next few days, I’ll step through each section of the workspace explaining what each bit does and the changes you need to be aware of.

part 2 >>

 


Upgrade to Angular by Darryl Brown is a daily bite-size newsletter containing Angular newsanalysis and advice.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.