Skip to content

Commit 7219f18

Browse files
committed
Add schematic questions
1 parent 2564fc5 commit 7219f18

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@
199199
|191| [How do you select an element in component template?](#how-do-you-select-an-element-in-component-template)|
200200
|192| [What is TestBed?](#what-is-testbed)|
201201
|193| [What is protractor?](#what-is-protractor)|
202-
|194| [](#)|
203-
|195| [](#)|
202+
|194| [What is collection?](#what-is-collection)|
203+
|195| [How do you create schematics for libraries?](#how-do-you-create-schematics-for-libraries)|
204204
|196| [](#)|
205205
|197| [](#)|
206206
|198| [](#)|
@@ -2939,11 +2939,19 @@
29392939
29402940
**[⬆ Back to Top](#table-of-contents)**
29412941
2942-
194. ### ?
2942+
194. ### What is collection?
2943+
Collection is a set of related schematics collected in an npm package. For example, `@schematics/angular` collection is used in Angular CLI to apply transforms to a web-app project. You can create your own schematic collection for customizing angular projects.
29432944
29442945
**[⬆ Back to Top](#table-of-contents)**
29452946
2946-
195. ### ?
2947+
195. ### How do you create schematics for libraries?
2948+
You can create your own schematic collections to integrate your library with the Angular CLI. These collections are classified as 3 main schematics,
2949+
1. **Add schematics:** These schematics are used to install library in an Angular workspace using `ng add` command.
2950+
For example, @angular/material schematic tells the add command to install and set up Angular Material and theming.
2951+
2. **Generate schematics**: These schematics are used to modify projects, add configurations and scripts, and scaffold artifacts in library using `ng generate` command.
2952+
For example, @angular/material generation schematic supplies generation schematics for the UI components. Let's say the table component is generated using `ng generate @angular/material:table `.
2953+
3. **Update schematics:** These schematics are used to update library's dependencies and adjust for breaking changes in a new library release using `ng update` command.
2954+
For example, @angular/material update schematic updates material and cdk dependencies using `ng update @angular/material` command.
29472955
29482956
**[⬆ Back to Top](#table-of-contents)**
29492957

0 commit comments

Comments
 (0)