9.1.0 • Published 6 days ago

@schematics/angular v9.1.0

Weekly downloads
1,914,575
License
MIT
Repository
github
Last release
6 days ago

Angular CLI

Development tools and libraries specialized for Angular

This is the home of the DevKit and the Angular CLI code. You can find the Angular CLI specific README here.

CircleCI branch Dependency Status devDependency Status

License

GitHub forks GitHub stars

Quick Links

GitterContributingAngular CLI

The Goal of Angular CLI

The Angular CLI creates, manages, builds and test your Angular projects. It's built on top of the Angular DevKit.

The Goal of DevKit

DevKit's goal is to provide a large set of libraries that can be used to manage, develop, deploy and analyze your code.

Getting Started - Local Development

Installation

To get started locally, follow these instructions:

  1. If you haven't done it already, make a fork of this repo.
  2. Clone to your local computer using git.
  3. Make sure that you have Node 10.13 or later installed. See instructions here.
  4. Make sure that you have yarn installed; see instructions here.
  5. Run yarn (no arguments) from the root of your clone of this project to install dependencies.

Building and Installing the CLI

To make a local build:

yarn build --local

This generates a number of tarballs in the dist/ directory. To actually use the locally built tools, switch to another repository reproducing the specific issue you want to fix (or just generate a local repo with ng new). Then install the locally built packages:

cd "${EXAMPLE_ANGULAR_PROJECT_REPO}"
npm install -D ${CLI_REPO}/dist/*.tgz

Builds of this example project will use tooling created from the previous local build and include any local changes. When using the CLI, it will automatically check for a local install and use that if present. This means you can just run:

npm install -g @angular/cli

to get a global install of the latest CLI release. Then running any ng command in the example project will automatically find and use the local build of the CLI.

Note: If you are testing ng update, be aware that installing all the tarballs will also update the framework (@angular/core) to the latest version. In this case, simply install the CLI alone with npm install -D ${CLI_REPO}/dist/_angular_cli.tgz, that way the rest of the project remains to be upgraded with ng update.

Debugging

To debug an invocation of the CLI, build and install the CLI for an example project, then run the desired ng command as:

node --inspect-brk node_modules/.bin/ng ...

This will trigger a breakpoint as the CLI starts up. You can connect to this using the supported mechanisms for your IDE, but the simplest option is to open Chrome to chrome://inspect and then click on the inspect link for the node_modules/.bin/ng Node target.

Unfortunately, the CLI dynamically require()'s other files mid-execution, so the debugger is not aware of all the source code files before hand. As a result, it is tough to put breakpoints on files before the CLI loads them. The easiest workaround is to use the debugger; statement to stop execution in the file you are interested in, and then you should be able to step around and set breakpoints as expected.

Testing

There are three different test suites which can be run locally:

  • Unit tests
    • Run: yarn test --full
    • Debug: yarn debug:test --full
  • Large tests
    • Run: yarn test-large --full
    • Debug: yarn debug:test-large --full
  • End to end tests
    • Run: node tests/legacy-cli/run_e2e.js
    • Run subset of tests: node tests/legacy-cli/run_e2e.js tests/legacy-cli/e2e/tests/i18n/ivy-localize-*

When running the debug commands, Node will stop and wait for a debugger to attach. You can attach your IDE to the debugger to stop on breakpoints and step through the code. Also see IDE Specific Usage for a simpler debug story.

When debugging a specific test, change describe() or it() to fdescribe() and fit() to focus execution to just that one test. This will keep the output clean and speed up execution by not running irrelevant tests.

IDE Specific Usage

Some additional tips for developing in specific IDEs.

Intellij IDEA / WebStorm

To load the project in Intellij products, simply Open the repository folder. Do not Import Project, because that will overwrite the existing configuration.

Once opened, the editor should automatically detect run configurations in the workspace. Use the drop down to choose which one to run and then click the Run button to start it. When executing a debug target, make sure to click the Debug icon to automatically attach the debugger (if you click Run, Node will wait forever for a debugger to attach).

Intellij IDEA run configurations

Creating New Packages

Adding a package to this repository means running two separate commands:

  1. schematics devkit:package PACKAGE_NAME. This will update the .monorepo file, and create the base files for the new package (package.json, src/index, etc).
  2. devkit-admin templates. This will update the README and all other template files that might have changed when adding a new package.

For private packages, you will need to add a "private": true key to your package.json manually. This will require re-running the template admin script.

Packages

This is a monorepo which contains many tools and packages:

Tools

ProjectPackageVersionLinks
Angular CLI@angular/clilatestREADME snapshot
Architect CLI@angular-devkit/architect-clilatestsnapshot
Schematics CLI@angular-devkit/schematics-clilatestsnapshot

Packages

ProjectPackageVersionLinks
Architect@angular-devkit/architectlatestREADME snapshot
Build Angular@angular-devkit/build-angularlatestREADME snapshot
Build NgPackagr@angular-devkit/build-ng-packagrlatestREADME snapshot
Build Optimizer@angular-devkit/build-optimizerlatestREADME snapshot
Build Webpack@angular-devkit/build-webpacklatestREADME snapshot
Core@angular-devkit/corelatestREADME snapshot
Schematics@angular-devkit/schematicslatestREADME snapshot

Schematics

ProjectPackageVersionLinks
Angular PWA Schematics@angular/pwalatestsnapshot
Angular Schematics@schematics/angularlatestsnapshot
Schematics Schematics@schematics/schematicslatestsnapshot
Package Update Schematics@schematics/updatelatestsnapshot

Misc

ProjectPackageVersionLinks
Webpack Angular Plugin@ngtools/webpacklatestsnapshot
@angular/cliheader-demo-trialsmart-sense-clicex-shema@tcsyyj/bithumb-page@vicoders/cli-suppoprtlcars-schematicsnz-schematicsnucleo-generatorny-tempngx-starter-crudnitor-sample-highcharts-testnitor-sample-highcharts-test10nitor-sample-highcharts-test11nitor-sample-highcharts-test2nitor-sample-highcharts-test3nitor-sample-highcharts-test4nitor-sample-highcharts-test5nitor-sample-highcharts-test6nitor-sample-highcharts-test7nitor-sample-highcharts-test8nitor-sample-highcharts-test9nitor-sample-linechartnitor-sample-testchartnitor-sample-testcharttwongx-onsenui-schematics-testngxs-statengxs-state-schematicspmasolutions-comp-testplaveoo-componentpgh-schematicspaulstelzer-ionic-angular-toolkitportal-tplmeteor-ngx-schematicsmui-schematicsmobiquity-ionic-angular-buildermobiquity-ionic-angular-schematicsmoon-schematicsmy-highcharts-testmy-linechart-testmyschemtestmyzonengx-thunderpschematicslohith-componentlockists-ng-lib-pagesmaterial-schematicsmati-schematicsrexjs-schemarg-npm-devrhm-schematicsreverse-proxy-schematicschematic-unb-servicoschematicdemoschematics-rx-moduleschematics-utilitiesscaffularscalable-schematicssamrt-djcxsample-highcharts-test@alvesthiago/clean-cli@alusta/create-schematics@alusta/mint@daisycon/angular-schematics@devon4node/schematics@conweaver/devkit@decerto/schematicstypexs-ng@flowaccount/serverlessui-jar-schematics@froko/ng-essentialssm-schematics@beeman/schematicssmart-lpztcxsmart-micro-site-schematicssmart-mssmart-xs-utilssmart-ysxkcxsmart-home-a1smart-kbjcxsmart-klzcx@bb-cli/schematics@bagubagu/schematics@feeloor/ng-extension-schematics@ezzing/ezz-schematicsutility-platform-schematic@gmsca/ng2element@gmsca/ngdivolte@gmsca/setupbootstrap@gmsca/setupmaterial@ghostrick/ng-schematics@hackandcraft/ng@helper-network/cypress-schematic@css_christianscharr/ngx-build-plus@cupcake-ds/schematicstemplate-cli-coretemplate-cli-schematics-salestcs-schematerra-schematics@electron-schematics/schematics
8.3.26

6 days ago

7.3.10

6 days ago

9.1.0

11 days ago

9.1.0-rc.0

13 days ago

9.0.7

17 days ago

9.1.0-next.4

17 days ago

9.0.6

25 days ago

9.1.0-next.3

25 days ago

9.0.5

1 month ago

9.1.0-next.2

1 month ago

9.0.4

1 month ago

9.1.0-next.1

1 month ago

9.0.3

2 months ago

9.1.0-next.0

2 months ago

9.0.2

2 months ago

9.0.1

2 months ago

9.0.0

2 months ago

8.3.25

2 months ago

9.0.0-rc.14

2 months ago

9.0.0-rc.13

2 months ago

8.3.24

2 months ago

9.0.0-rc.12

2 months ago

9.0.0-rc.11

2 months ago

9.0.0-rc.10

2 months ago

8.3.23

3 months ago

9.0.0-rc.9

3 months ago

8.3.22

3 months ago

9.0.0-rc.8

3 months ago

9.0.0-rc.7

4 months ago

8.3.21

4 months ago

9.0.0-rc.6

4 months ago

9.0.0-rc.5

4 months ago

8.3.20

4 months ago

9.0.0-rc.4

4 months ago

9.0.0-rc.3

5 months ago

9.0.0-rc.2

5 months ago

8.3.19

5 months ago

8.3.18

5 months ago

9.0.0-rc.1

5 months ago

9.0.0-rc.0

5 months ago

8.3.17

5 months ago

9.0.0-next.19

5 months ago

8.3.16

5 months ago

9.0.0-next.18

5 months ago

9.0.0-next.17

5 months ago

8.3.15

5 months ago

9.0.0-next.16

5 months ago

9.0.0-next.15

5 months ago

8.3.14

5 months ago

9.0.0-next.14

6 months ago

8.3.13

6 months ago

9.0.0-next.13

6 months ago

8.3.12

6 months ago

9.0.0-next.12

6 months ago

9.0.0-next.11

6 months ago

8.3.10

6 months ago

9.0.0-next.10

6 months ago

8.3.9

6 months ago

9.0.0-next.9

6 months ago

9.0.0-next.8

6 months ago

8.3.8

6 months ago

9.0.0-next.7

6 months ago

8.3.7

6 months ago

9.0.0-next.6

6 months ago

8.3.6

6 months ago

8.3.5

7 months ago

9.0.0-next.5

7 months ago

8.3.4

7 months ago

9.0.0-next.4

7 months ago

9.0.0-next.3

7 months ago

8.3.3

7 months ago

9.0.0-next.2

7 months ago

8.3.2

7 months ago

8.3.1

7 months ago

9.0.0-next.1

7 months ago

9.0.0-next.0

8 months ago

8.3.0

8 months ago

8.3.0-rc.0

8 months ago

8.2.2

8 months ago

8.3.0-next.2

8 months ago

8.3.0-next.1

8 months ago

8.2.1

8 months ago

8.2.0

8 months ago

8.3.0-next.0

8 months ago

8.1.3

8 months ago

8.2.0-rc.0

8 months ago

8.2.0-next.1

9 months ago

8.1.2

9 months ago

8.2.0-next.0

9 months ago

8.1.1

9 months ago

8.1.0

9 months ago

8.0.6

9 months ago

8.0.5

9 months ago

8.1.0-rc.0

9 months ago

8.1.0-beta.3

10 months ago

8.0.4

10 months ago

8.1.0-beta.2

10 months ago

8.1.0-beta.1

10 months ago

8.1.0-beta.0

10 months ago

8.0.3

10 months ago

8.0.2

10 months ago

8.0.1

10 months ago

8.0.0

10 months ago

8.0.0-rc.4

11 months ago

8.0.0-rc.3

11 months ago

7.3.9

11 months ago

8.0.0-rc.2

11 months ago

8.0.0-rc.1

11 months ago

8.0.0-rc.0

12 months ago

8.0.0-beta.18

12 months ago

8.0.0-beta.17

12 months ago

8.0.0-beta.16

12 months ago

8.0.0-beta.15

12 months ago

8.0.0-beta.14

12 months ago

8.0.0-beta.13

12 months ago

8.0.0-beta.12

12 months ago

8.0.0-beta.11

1 year ago

7.3.8

1 year ago

8.0.0-beta.10

1 year ago

7.3.7

1 year ago

8.0.0-beta.9

1 year ago

8.0.0-beta.8

1 year ago

8.0.0-beta.7

1 year ago

7.3.6

1 year ago

8.0.0-beta.6

1 year ago

7.3.5

1 year ago

8.0.0-beta.5

1 year ago

7.3.4

1 year ago

8.0.0-beta.4

1 year ago

8.0.0-beta.2

1 year ago

7.3.3

1 year ago

8.0.0-beta.1

1 year ago

7.3.2

1 year ago

7.3.1

1 year ago

8.0.0-beta.0

1 year ago

7.3.0

1 year ago

7.2.4

1 year ago

7.3.0-rc.0

1 year ago

7.2.3

1 year ago

7.2.2

1 year ago

7.3.0-beta.0

1 year ago

7.2.1

1 year ago

7.2.0

1 year ago

0.8.9

1 year ago

7.2.0-rc.0

1 year ago

7.1.4

1 year ago

7.2.0-beta.2

1 year ago

7.1.3

1 year ago

7.2.0-beta.1

1 year ago

7.1.2

1 year ago

7.1.1

1 year ago

7.2.0-beta.0

1 year ago

0.8.8

1 year ago

7.1.0

1 year ago

7.0.7

1 year ago

7.1.0-rc.0

1 year ago

7.0.6

1 year ago

7.0.5

1 year ago

7.1.0-beta.1

1 year ago

0.8.7

1 year ago

7.1.0-beta.0

1 year ago

7.0.4

1 year ago

7.0.3

1 year ago

0.8.6

1 year ago

7.0.2

1 year ago

7.0.1

1 year ago

7.0.0

1 year ago

0.8.5

1 year ago

7.0.0-rc.3

1 year ago

7.0.0-rc.2

2 years ago

7.0.0-rc.1

2 years ago

0.8.4

2 years ago

0.6.0-rc.0

2 years ago

7.0.0-rc.0

2 years ago

7.0.0-beta.4

2 years ago

0.8.3

2 years ago

0.9.0-beta.3

2 years ago

0.8.2

2 years ago

0.9.0-beta.2

2 years ago

0.9.0-beta.1

2 years ago

0.9.0-beta.0

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.8.0-rc.1

2 years ago

0.8.0-rc.0

2 years ago

0.7.5

2 years ago

0.7.4

2 years ago

0.8.0-beta.3

2 years ago

0.8.0-beta.2

2 years ago

0.7.3

2 years ago

0.8.0-beta.1

2 years ago

0.8.0-beta.0

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.7.0-rc.3

2 years ago

0.7.0-rc.2

2 years ago

0.7.0-rc.1

2 years ago

0.7.0-rc.0

2 years ago

0.7.0-beta.2

2 years ago

0.6.8

2 years ago

0.7.0-beta.1

2 years ago

0.7.0-beta.0

2 years ago

0.6.7

2 years ago

0.6.6

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.13

2 years ago

0.5.12

2 years ago

0.5.11

2 years ago

0.5.10

2 years ago

0.5.9

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.3.2

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.49

2 years ago

0.0.48

2 years ago

0.0.47

2 years ago

0.0.46

2 years ago

0.0.45

2 years ago

0.0.44

2 years ago

0.0.43

2 years ago

0.0.42

2 years ago

0.0.41

2 years ago

0.0.40

2 years ago

0.0.39

3 years ago

0.0.38

3 years ago

0.0.37

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.34

3 years ago

0.0.33

3 years ago

0.0.31

3 years ago

0.0.30

3 years ago

0.0.29

3 years ago

0.0.28

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago