Reader small image

You're reading from  Angular Projects - Third Edition

Product typeBook
Published inJul 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781803239118
Edition3rd Edition
Languages
Tools
Right arrow
Author (1)
Aristeidis Bampakos
Aristeidis Bampakos
author image
Aristeidis Bampakos

Aristeidis Bampakos is a Web Development Team Lead at Plex-Earth who specializes in the development of web applications with Angular. He has been an Angular Google Developer Expert (GDE) since 2020 and works as an Angular Senior Tech Instructor at Code.Hub, a private educational institute, where he nurtures aspiring Angular developers and professionals. He is also the author of Angular Projects with Packt.
Read more about Aristeidis Bampakos

Right arrow

Installing the Schematics CLI

The Schematics CLI is a command-line interface that we can use to interact with the Schematics API. To install it, run the following npm command:

npm install -g @angular-devkit/schematics-cli

The preceding command will install the @angular-devkit/schematics-cli npm package globally on our system. We can then use the schematics executable to create a new collection for the schematics:

schematics blank my-schematics

The previous command will generate a schematics project called my-schematics. It contains a schematic with the same name by default inside the src folder. A schematic includes the following files:

  • collection.json: A JSON schema that describes the schematics that belong to the my-schematics collection.
  • my-schematics\index.ts: The main entry point of the schematic.
  • my-schematics\index_spec.ts: The unit test file of the main entry point of the schematic.

The JSON schema file of the collection contains...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Angular Projects - Third Edition
Published in: Jul 2023Publisher: PacktISBN-13: 9781803239118

Author (1)

author image
Aristeidis Bampakos

Aristeidis Bampakos is a Web Development Team Lead at Plex-Earth who specializes in the development of web applications with Angular. He has been an Angular Google Developer Expert (GDE) since 2020 and works as an Angular Senior Tech Instructor at Code.Hub, a private educational institute, where he nurtures aspiring Angular developers and professionals. He is also the author of Angular Projects with Packt.
Read more about Aristeidis Bampakos