@angular/cli 19.1.0-rc.0 → 19.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,86 +101,102 @@ export interface SchematicOptions {
101
101
  [property: string]: any;
102
102
  }
103
103
  /**
104
- * Generates a new basic application definition in the "projects" subfolder of the workspace.
104
+ * Generates a new Angular application within your workspace. This schematic sets up the
105
+ * foundational structure of your project, including the root component, module, and
106
+ * configuration files. You can customize various aspects of the application, such as
107
+ * routing, styling, and testing.
105
108
  */
106
109
  export interface AngularApplicationOptionsSchema {
107
110
  /**
108
- * Create an application that does not utilize zone.js.
111
+ * Generate an application that does not use `zone.js`.
109
112
  */
110
113
  experimentalZoneless?: boolean;
111
114
  /**
112
- * Include styles inline in the root component.ts file. Only CSS styles can be included
113
- * inline. Default is false, meaning that an external styles file is created and referenced
114
- * in the root component.ts file.
115
+ * Include the styles for the root component directly within the `app.component.ts` file.
116
+ * Only CSS styles can be included inline. By default, a separate stylesheet file (e.g.,
117
+ * `app.component.css`) is created.
115
118
  */
116
119
  inlineStyle?: boolean;
117
120
  /**
118
- * Include template inline in the root component.ts file. Default is false, meaning that an
119
- * external template file is created and referenced in the root component.ts file.
121
+ * Include the HTML template for the root component directly within the `app.component.ts`
122
+ * file. By default, a separate template file (e.g., `app.component.html`) is created.
120
123
  */
121
124
  inlineTemplate?: boolean;
122
125
  /**
123
- * Create a bare-bones project without any testing frameworks. (Use for learning purposes
124
- * only.)
126
+ * Generate a minimal project without any testing frameworks. This is intended for learning
127
+ * purposes and simple experimentation, not for production applications.
125
128
  */
126
129
  minimal?: boolean;
127
130
  /**
128
- * The name of the new application.
131
+ * The name for the new application. This name will be used for the project directory and
132
+ * various identifiers throughout the application's code.
129
133
  */
130
134
  name: string;
131
135
  /**
132
- * A prefix to apply to generated selectors.
136
+ * A prefix to be added to the selectors of components generated within this application.
137
+ * For example, if the prefix is `my-app` and you generate a component named `my-component`,
138
+ * the selector will be `my-app-my-component`.
133
139
  */
134
140
  prefix?: string;
135
141
  /**
136
- * The root directory of the new application.
142
+ * The directory where the new application's files will be created, relative to the
143
+ * workspace root. If not specified, the application will be created in a subfolder within
144
+ * the `projects` directory, using the application's name.
137
145
  */
138
146
  projectRoot?: string;
139
147
  /**
140
- * Creates an application with routing enabled.
148
+ * Generate an application with routing already configured. This sets up the necessary files
149
+ * and modules for managing navigation between different views in your application.
141
150
  */
142
151
  routing?: boolean;
143
152
  /**
144
- * Creates a server application using the Server Routing and App Engine APIs (Developer
153
+ * Set up a server application using the Server Routing and App Engine APIs (Developer
145
154
  * Preview).
146
155
  */
147
156
  serverRouting?: boolean;
148
157
  /**
149
- * Skip installing dependency packages.
158
+ * Skip the automatic installation of packages. You will need to manually install the
159
+ * dependencies later.
150
160
  */
151
161
  skipInstall?: boolean;
152
162
  /**
153
- * Do not add dependencies to the "package.json" file.
163
+ * Do not add dependencies to the `package.json` file.
154
164
  */
155
165
  skipPackageJson?: boolean;
156
166
  /**
157
- * Do not create "spec.ts" test files for the application.
167
+ * Skip the generation of a unit test files `spec.ts`.
158
168
  */
159
169
  skipTests?: boolean;
160
170
  /**
161
- * Creates an application with Server-Side Rendering (SSR) and Static Site Generation
162
- * (SSG/Prerendering) enabled.
171
+ * Configure the application for Server-Side Rendering (SSR) and Static Site Generation
172
+ * (SSG/Prerendering).
163
173
  */
164
174
  ssr?: boolean;
165
175
  /**
166
- * Creates an application based upon the standalone API, without NgModules.
176
+ * Create an application that utilizes the standalone API, eliminating the need for
177
+ * NgModules. This can simplify the structure of your application.
167
178
  */
168
179
  standalone?: boolean;
169
180
  /**
170
- * Creates an application with stricter bundle budgets settings.
181
+ * Enable stricter bundle budget settings for the application. This helps to keep your
182
+ * application's bundle size small and improve performance. For more information, see
183
+ * https://angular.dev/tools/cli/template-typecheck#strict-mode
171
184
  */
172
185
  strict?: boolean;
173
186
  /**
174
- * The file extension or preprocessor to use for style files.
187
+ * The type of stylesheet files to be created for components in the application.
175
188
  */
176
189
  style?: SchematicsAngularApplicationStyle;
177
190
  /**
178
- * The view encapsulation strategy to use in the new application.
191
+ * Sets the view encapsulation mode for the application's components. This determines how
192
+ * component styles are scoped and applied.
179
193
  */
180
194
  viewEncapsulation?: ViewEncapsulation;
181
195
  }
182
196
  /**
183
- * The file extension or preprocessor to use for style files.
197
+ * The type of stylesheet files to be created for components in the application.
198
+ *
199
+ * The type of stylesheet files to be created for components in the initial project.
184
200
  */
185
201
  export declare enum SchematicsAngularApplicationStyle {
186
202
  Css = "css",
@@ -189,11 +205,16 @@ export declare enum SchematicsAngularApplicationStyle {
189
205
  Scss = "scss"
190
206
  }
191
207
  /**
192
- * The view encapsulation strategy to use in the new application.
208
+ * Sets the view encapsulation mode for the application's components. This determines how
209
+ * component styles are scoped and applied.
193
210
  *
194
- * The view encapsulation strategy to use in the new component.
211
+ * Sets the view encapsulation mode for the component. This determines how the component's
212
+ * styles are scoped and applied.
195
213
  *
196
- * The view encapsulation strategy to use in the initial project.
214
+ * Sets the view encapsulation mode for components in the initial project. This determines
215
+ * how component styles are scoped and applied. Options include: `Emulated` (default, styles
216
+ * are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
217
+ * encapsulated using Shadow DOM).
197
218
  */
198
219
  export declare enum ViewEncapsulation {
199
220
  Emulated = "Emulated",
@@ -201,129 +222,153 @@ export declare enum ViewEncapsulation {
201
222
  ShadowDom = "ShadowDom"
202
223
  }
203
224
  /**
204
- * Creates a new, generic class definition in the given project.
225
+ * Creates a new class in your project. Classes are the fundamental building blocks for
226
+ * object-oriented programming in TypeScript. They provide a blueprint for creating objects
227
+ * with properties and methods. This schematic helps you generate a new class with the basic
228
+ * structure and optional test files.
205
229
  */
206
230
  export interface AngularClassOptionsSchema {
207
231
  /**
208
- * The name of the new class.
232
+ * The name for the new class. This will be used to create the class file (e.g.,
233
+ * `my-class.ts`) and, if enabled, the corresponding test file `my-class.spec.ts`.
209
234
  */
210
235
  name: string;
211
236
  /**
212
- * The path at which to create the class, relative to the workspace root.
237
+ * The path where the class file should be created, relative to the workspace root. If not
238
+ * specified, the class will be created in the current directory.
213
239
  */
214
240
  path?: string;
215
241
  /**
216
- * The name of the project.
242
+ * The name of the project where the class should be added. If not specified, the CLI will
243
+ * determine the project from the current directory.
217
244
  */
218
245
  project: string;
219
246
  /**
220
- * Do not create "spec.ts" test files for the new class.
247
+ * Skip the generation of a unit test file `spec.ts` for the new class.
221
248
  */
222
249
  skipTests?: boolean;
223
250
  /**
224
- * Adds a developer-defined type to the filename, in the format "name.type.ts".
251
+ * Adds a custom type to the filename, allowing you to create more descriptive class names.
252
+ * For example, if you set the type to `helper`, the filename will be `my-class.helper.ts`.
225
253
  */
226
254
  type?: string;
227
255
  }
228
256
  /**
229
- * Creates a new, generic component definition in the given project.
257
+ * Creates a new Angular component. Components are the basic building blocks of Angular
258
+ * applications. Each component consists of a TypeScript class, an HTML template, and an
259
+ * optional CSS stylesheet. Use this schematic to generate a new component in your project.
230
260
  */
231
261
  export interface AngularComponentOptionsSchema {
232
262
  /**
233
- * The change detection strategy to use in the new component.
263
+ * Configures the change detection strategy for the component.
234
264
  */
235
265
  changeDetection?: ChangeDetection;
236
266
  /**
237
- * Specifies if the style will contain `:host { display: block; }`.
267
+ * Adds `:host { display: block; }` to the component's stylesheet, ensuring the component
268
+ * renders as a block-level element. This is useful for layout purposes.
238
269
  */
239
270
  displayBlock?: boolean;
240
271
  /**
241
- * The declaring NgModule exports this component.
272
+ * Automatically export the component from the specified NgModule, making it accessible to
273
+ * other modules in the application.
242
274
  */
243
275
  export?: boolean;
244
276
  /**
245
- * Use default export for the component instead of a named export.
277
+ * Use a default export for the component in its TypeScript file instead of a named export.
246
278
  */
247
279
  exportDefault?: boolean;
248
280
  /**
249
- * Create the new files at the top level of the current project.
281
+ * Create the component files directly in the project's `src/app` directory instead of
282
+ * creating a new folder for them.
250
283
  */
251
284
  flat?: boolean;
252
285
  /**
253
- * Include styles inline in the component.ts file. Only CSS styles can be included inline.
254
- * By default, an external styles file is created and referenced in the component.ts file.
286
+ * Include the component's styles directly in the `component.ts` file. By default, a
287
+ * separate stylesheet file (e.g., `my-component.component.css`) is created.
255
288
  */
256
289
  inlineStyle?: boolean;
257
290
  /**
258
- * Include template inline in the component.ts file. By default, an external template file
259
- * is created and referenced in the component.ts file.
291
+ * Include the component's HTML template directly in the `component.ts` file. By default, a
292
+ * separate template file (e.g., `my-component.component.html`) is created.
260
293
  */
261
294
  inlineTemplate?: boolean;
262
295
  /**
263
- * The declaring NgModule.
296
+ * Specify the NgModule where the component should be declared. If not provided, the CLI
297
+ * will attempt to find the closest NgModule in the component's path.
264
298
  */
265
299
  module?: string;
266
300
  /**
267
- * The name of the component.
301
+ * The name for the new component. This will be used to create the component's class,
302
+ * template, and stylesheet files. For example, if you provide `my-component`, the files
303
+ * will be named `my-component.component.ts`, `my-component.component.html`, and
304
+ * `my-component.component.css`.
268
305
  */
269
306
  name: string;
270
307
  /**
271
- * The path at which to create the component file, relative to the current workspace.
272
- * Default is a folder with the same name as the component in the project root.
308
+ * The path where the component files should be created, relative to the current workspace.
309
+ * If not provided, a folder with the same name as the component will be created in the
310
+ * project's `src/app` directory.
273
311
  */
274
312
  path?: string;
275
313
  /**
276
- * The prefix to apply to the generated component selector.
314
+ * A prefix to be added to the component's selector. For example, if the prefix is `app` and
315
+ * the component name is `my-component`, the selector will be `app-my-component`.
277
316
  */
278
317
  prefix?: string;
279
318
  /**
280
- * The name of the project.
319
+ * The name of the project where the component should be added. If not specified, the CLI
320
+ * will determine the project from the current directory.
281
321
  */
282
322
  project: string;
283
323
  /**
284
- * The HTML selector to use for this component.
324
+ * The HTML selector to use for this component. If not provided, a selector will be
325
+ * generated based on the component name (e.g., `app-my-component`).
285
326
  */
286
327
  selector?: string;
287
328
  /**
288
- * Do not import this component into the owning NgModule.
329
+ * Do not automatically import the new component into its closest NgModule.
289
330
  */
290
331
  skipImport?: boolean;
291
332
  /**
292
- * Specifies if the component should have a selector or not.
333
+ * Skip the generation of an HTML selector for the component.
293
334
  */
294
335
  skipSelector?: boolean;
295
336
  /**
296
- * Do not create "spec.ts" test files for the new component.
337
+ * Skip the generation of unit test files `spec.ts`.
297
338
  */
298
339
  skipTests?: boolean;
299
340
  /**
300
- * Whether the generated component is standalone.
341
+ * Generate a standalone component. Standalone components are self-contained and don't need
342
+ * to be declared in an NgModule. They can be used independently or imported directly into
343
+ * other standalone components.
301
344
  */
302
345
  standalone?: boolean;
303
346
  /**
304
- * The file extension or preprocessor to use for style files, or 'none' to skip generating
305
- * the style file.
347
+ * Specify the type of stylesheet to be created for the component, or `none` to skip
348
+ * creating a stylesheet.
306
349
  */
307
350
  style?: SchematicsAngularComponentStyle;
308
351
  /**
309
- * Adds a developer-defined type to the filename, in the format "name.type.ts".
352
+ * Append a custom type to the component's filename. For example, if you set the type to
353
+ * `container`, the file will be named `my-component.container.ts`.
310
354
  */
311
355
  type?: string;
312
356
  /**
313
- * The view encapsulation strategy to use in the new component.
357
+ * Sets the view encapsulation mode for the component. This determines how the component's
358
+ * styles are scoped and applied.
314
359
  */
315
360
  viewEncapsulation?: ViewEncapsulation;
316
361
  }
317
362
  /**
318
- * The change detection strategy to use in the new component.
363
+ * Configures the change detection strategy for the component.
319
364
  */
320
365
  export declare enum ChangeDetection {
321
366
  Default = "Default",
322
367
  OnPush = "OnPush"
323
368
  }
324
369
  /**
325
- * The file extension or preprocessor to use for style files, or 'none' to skip generating
326
- * the style file.
370
+ * Specify the type of stylesheet to be created for the component, or `none` to skip
371
+ * creating a stylesheet.
327
372
  */
328
373
  export declare enum SchematicsAngularComponentStyle {
329
374
  Css = "css",
@@ -333,108 +378,134 @@ export declare enum SchematicsAngularComponentStyle {
333
378
  Scss = "scss"
334
379
  }
335
380
  /**
336
- * Creates a new, generic directive definition in the given project.
381
+ * Creates a new directive in your project. Directives are used to extend the behavior or
382
+ * appearance of HTML elements and components. They allow you to manipulate the DOM, add
383
+ * custom attributes, and respond to events. This schematic generates the necessary files
384
+ * and boilerplate code for a new directive.
337
385
  */
338
386
  export interface AngularDirectiveOptionsSchema {
339
387
  /**
340
- * The declaring NgModule exports this directive.
388
+ * Automatically export the directive from the specified NgModule, making it accessible to
389
+ * other modules in the application.
341
390
  */
342
391
  export?: boolean;
343
392
  /**
344
- * When true (the default), creates the new files at the top level of the current project.
393
+ * Creates the new directive files at the top level of the current project. If set to false,
394
+ * a new folder with the directive's name will be created to contain the files.
345
395
  */
346
396
  flat?: boolean;
347
397
  /**
348
- * The declaring NgModule.
398
+ * Specify the NgModule where the directive should be declared. If not provided, the CLI
399
+ * will attempt to find the closest NgModule in the directive's path.
349
400
  */
350
401
  module?: string;
351
402
  /**
352
- * The name of the new directive.
403
+ * The name for the new directive. This will be used to create the directive's class and
404
+ * spec files (e.g., `my-directive.directive.ts` and `my-directive.directive.spec.ts`).
353
405
  */
354
406
  name: string;
355
407
  /**
356
- * The path at which to create the interface that defines the directive, relative to the
357
- * workspace root.
408
+ * The path where the directive files should be created, relative to the workspace root. If
409
+ * not provided, the directive will be created in the current directory.
358
410
  */
359
411
  path?: string;
360
412
  /**
361
- * A prefix to apply to generated selectors.
413
+ * A prefix to be added to the directive's selector. For example, if the prefix is `app` and
414
+ * the directive name is `highlight`, the selector will be `appHighlight`.
362
415
  */
363
416
  prefix?: string;
364
417
  /**
365
- * The name of the project.
418
+ * The name of the project where the directive should be added. If not specified, the CLI
419
+ * will determine the project from the current directory.
366
420
  */
367
421
  project: string;
368
422
  /**
369
- * The HTML selector to use for this directive.
423
+ * The HTML selector to use for this directive. If not provided, a selector will be
424
+ * generated based on the directive's name (e.g., `appHighlight`).
370
425
  */
371
426
  selector?: string;
372
427
  /**
373
- * Do not import this directive into the owning NgModule.
428
+ * Do not automatically import the new directive into its closest NgModule.
374
429
  */
375
430
  skipImport?: boolean;
376
431
  /**
377
- * Do not create "spec.ts" test files for the new class.
432
+ * Skip the generation of a unit test file `spec.ts` for the new directive.
378
433
  */
379
434
  skipTests?: boolean;
380
435
  /**
381
- * Whether the generated directive is standalone.
436
+ * Generate a standalone directive. Standalone directives are self-contained and don't need
437
+ * to be declared in an NgModule. They can be used independently or imported directly into
438
+ * other standalone components or directives.
382
439
  */
383
440
  standalone?: boolean;
384
441
  }
385
442
  /**
386
- * Generates a new, generic enum definition in the given project.
443
+ * Creates a new enum in your project. Enums (enumerations) are a way to define a set of
444
+ * named constants, making your code more readable and maintainable. This schematic
445
+ * generates a new enum with the specified name and type.
387
446
  */
388
447
  export interface AngularEnumOptionsSchema {
389
448
  /**
390
- * The name of the enum.
449
+ * The name for the new enum. This will be used to create the enum file (e.g.,
450
+ * `my-enum.enum.ts`).
391
451
  */
392
452
  name: string;
393
453
  /**
394
- * The path at which to create the enum definition, relative to the current workspace.
454
+ * The path where the enum file should be created, relative to the current workspace. If not
455
+ * specified, the enum will be created in the current directory.
395
456
  */
396
457
  path?: string;
397
458
  /**
398
- * The name of the project in which to create the enum. Default is the configured default
399
- * project for the workspace.
459
+ * The name of the project where the enum should be created. If not specified, the CLI will
460
+ * determine the project from the current directory.
400
461
  */
401
462
  project: string;
402
463
  /**
403
- * Adds a developer-defined type to the filename, in the format "name.type.ts".
464
+ * Adds a custom type to the filename, allowing you to create more descriptive enum names.
465
+ * For example, if you set the type to `status`, the filename will be `my-enum.status.ts`.
404
466
  */
405
467
  type?: string;
406
468
  }
407
469
  /**
408
- * Generates a new, generic route guard definition in the given project.
470
+ * Creates a new route guard in your project. Route guards are used to control access to
471
+ * parts of your application by checking certain conditions before a route is activated.
472
+ * This schematic generates a new guard with the specified name, type, and options.
409
473
  */
410
474
  export interface AngularGuardOptionsSchema {
411
475
  /**
412
- * When true (the default), creates the new files at the top level of the current project.
476
+ * Creates the new guard files at the top level of the current project. If set to false, a
477
+ * new folder with the guard's name will be created to contain the files.
413
478
  */
414
479
  flat?: boolean;
415
480
  /**
416
- * Specifies whether to generate a guard as a function.
481
+ * Generate the guard as a function instead of a class. Functional guards can be simpler for
482
+ * basic scenarios.
417
483
  */
418
484
  functional?: boolean;
419
485
  /**
420
- * Specifies which type of guard to create.
486
+ * Specifies the type(s) of guard to create. You can choose one or more of the following:
487
+ * `CanActivate` (controls access to a route), `CanActivateChild` (controls access to child
488
+ * routes), `CanDeactivate` (asks for confirmation before leaving a route), `CanMatch`
489
+ * (determines if a route can be matched).
421
490
  */
422
491
  implements?: Implement[];
423
492
  /**
424
- * The name of the new route guard.
493
+ * The name for the new route guard. This will be used to create the guard's class and spec
494
+ * files (e.g., `my-guard.guard.ts` and `my-guard.guard.spec.ts`).
425
495
  */
426
496
  name: string;
427
497
  /**
428
- * The path at which to create the interface that defines the guard, relative to the current
429
- * workspace.
498
+ * The path where the guard files should be created, relative to the current workspace. If
499
+ * not provided, the guard will be created in the current directory.
430
500
  */
431
501
  path?: string;
432
502
  /**
433
- * The name of the project.
503
+ * The name of the project where the guard should be created. If not specified, the CLI will
504
+ * determine the project from the current directory.
434
505
  */
435
506
  project: string;
436
507
  /**
437
- * Do not create "spec.ts" test files for the new guard.
508
+ * Skip the generation of a unit test file `spec.ts` for the new guard.
438
509
  */
439
510
  skipTests?: boolean;
440
511
  }
@@ -445,139 +516,177 @@ export declare enum Implement {
445
516
  CanMatch = "CanMatch"
446
517
  }
447
518
  /**
448
- * Creates a new, generic interceptor definition in the given project.
519
+ * Creates a new interceptor in your project. Interceptors are used to intercept and modify
520
+ * HTTP requests and responses before they reach their destination. This allows you to
521
+ * perform tasks like adding authentication headers, handling errors, or logging requests.
522
+ * This schematic generates the necessary files and boilerplate code for a new interceptor.
449
523
  */
450
524
  export interface AngularInterceptorOptionsSchema {
451
525
  /**
452
- * When true (the default), creates files at the top level of the project.
526
+ * Creates the new interceptor files at the top level of the current project. If set to
527
+ * false, a new folder with the interceptor's name will be created to contain the files.
453
528
  */
454
529
  flat?: boolean;
455
530
  /**
456
- * Creates the interceptor as a `HttpInterceptorFn`.
531
+ * Creates the interceptor as a function `HttpInterceptorFn` instead of a class. Functional
532
+ * interceptors can be simpler for basic scenarios.
457
533
  */
458
534
  functional?: boolean;
459
535
  /**
460
- * The name of the interceptor.
536
+ * The name for the new interceptor. This will be used to create the interceptor's class and
537
+ * spec files (e.g., `my-interceptor.interceptor.ts` and
538
+ * `my-interceptor.interceptor.spec.ts`).
461
539
  */
462
540
  name: string;
463
541
  /**
464
- * The path at which to create the interceptor, relative to the workspace root.
542
+ * The path where the interceptor files should be created, relative to the workspace root.
543
+ * If not provided, the interceptor will be created in the current directory.
465
544
  */
466
545
  path?: string;
467
546
  /**
468
- * The name of the project.
547
+ * The name of the project where the interceptor should be created. If not specified, the
548
+ * CLI will determine the project from the current directory.
469
549
  */
470
550
  project: string;
471
551
  /**
472
- * Do not create "spec.ts" test files for the new interceptor.
552
+ * Skip the generation of a unit test file `spec.ts` for the new interceptor.
473
553
  */
474
554
  skipTests?: boolean;
475
555
  }
476
556
  /**
477
- * Creates a new, generic interface definition in the given project.
557
+ * Creates a new interface in your project. Interfaces define the structure of objects in
558
+ * TypeScript, ensuring type safety and code clarity. This schematic generates a new
559
+ * interface with the specified name and type.
478
560
  */
479
561
  export interface AngularInterfaceOptionsSchema {
480
562
  /**
481
- * The name of the interface.
563
+ * The name for the new interface. This will be used to create the interface file (e.g.,
564
+ * `my-interface.interface.ts`).
482
565
  */
483
566
  name: string;
484
567
  /**
485
- * The path at which to create the interface, relative to the workspace root.
568
+ * The path where the interface file should be created, relative to the workspace root. If
569
+ * not provided, the interface will be created in the current directory.
486
570
  */
487
571
  path?: string;
488
572
  /**
489
- * A prefix to apply to generated selectors.
573
+ * A prefix to be added to the interface name. This is typically not used for interfaces, as
574
+ * they don't have selectors like components or directives.
490
575
  */
491
576
  prefix?: string;
492
577
  /**
493
- * The name of the project.
578
+ * The name of the project where the interface should be created. If not specified, the CLI
579
+ * will determine the project from the current directory.
494
580
  */
495
581
  project: string;
496
582
  /**
497
- * Adds a developer-defined type to the filename, in the format "name.type.ts".
583
+ * Adds a custom type to the filename, allowing you to create more descriptive interface
584
+ * names. For example, if you set the type to `data`, the filename will be
585
+ * `my-interface.data.ts`.
498
586
  */
499
587
  type?: string;
500
588
  }
501
589
  /**
502
- * Creates a new, generic library project in the current workspace.
590
+ * Creates a new library project in your Angular workspace. Libraries are reusable
591
+ * collections of components, services, and other Angular artifacts that can be shared
592
+ * across multiple applications. This schematic simplifies the process of generating a new
593
+ * library with the necessary files and configurations.
503
594
  */
504
595
  export interface LibraryOptionsSchema {
505
596
  /**
506
- * The path at which to create the library's public API file, relative to the workspace root.
597
+ * The path to the library's public API file, relative to the workspace root. This file
598
+ * defines what parts of the library are accessible to applications that import it.
507
599
  */
508
600
  entryFile?: string;
509
601
  /**
510
- * The name of the library.
602
+ * The name for the new library. This name will be used for the project directory and
603
+ * various identifiers within the library's code.
511
604
  */
512
605
  name: string;
513
606
  /**
514
- * A prefix to apply to generated selectors.
607
+ * A prefix to be added to the selectors of components generated within this library. For
608
+ * example, if the prefix is `my-lib` and you generate a component named `my-component`, the
609
+ * selector will be `my-lib-my-component`.
515
610
  */
516
611
  prefix?: string;
517
612
  /**
518
- * The root directory of the new library.
613
+ * The root directory for the new library, relative to the workspace root. If not specified,
614
+ * the library will be created in a subfolder within the `projects` directory, using the
615
+ * library's name.
519
616
  */
520
617
  projectRoot?: string;
521
618
  /**
522
- * Do not install dependency packages.
619
+ * Skip the automatic installation of packages. You will need to manually install the
620
+ * dependencies later.
523
621
  */
524
622
  skipInstall?: boolean;
525
623
  /**
526
- * Do not add dependencies to the "package.json" file.
624
+ * Do not automatically add dependencies to the `package.json` file.
527
625
  */
528
626
  skipPackageJson?: boolean;
529
627
  /**
530
- * Do not update "tsconfig.json" to add a path mapping for the new library. The path mapping
531
- * is needed to use the library in an app, but can be disabled here to simplify development.
628
+ * Do not update the workspace `tsconfig.json` file to add a path mapping for the new
629
+ * library. The path mapping is needed to use the library in an application, but can be
630
+ * disabled here to simplify development.
532
631
  */
533
632
  skipTsConfig?: boolean;
534
633
  /**
535
- * Creates a library based upon the standalone API, without NgModules.
634
+ * Create a library that utilizes the standalone API, eliminating the need for NgModules.
635
+ * This can simplify the structure of your library and its usage in applications.
536
636
  */
537
637
  standalone?: boolean;
538
638
  }
539
639
  /**
540
- * Creates a new project by combining the workspace and application schematics.
640
+ * Creates a new Angular workspace and an initial project. This schematic sets up the
641
+ * foundation for your Angular development, generating the workspace configuration files and
642
+ * an optional starter application. You can customize various aspects of the workspace and
643
+ * the initial project, such as routing, styling, and testing.
541
644
  */
542
645
  export interface AngularNgNewOptionsSchema {
543
646
  /**
544
- * Initial git repository commit information.
647
+ * Configure the initial Git commit for the new repository.
545
648
  */
546
649
  commit?: CommitUnion;
547
650
  /**
548
- * Create a new initial application project in the 'src' folder of the new workspace. When
549
- * false, creates an empty workspace with no initial application. You can then use the
550
- * generate application command so that all applications are created in the projects folder.
651
+ * Create a new initial application project in the new workspace. When false, creates an
652
+ * empty workspace with no initial application. You can then use the `ng generate
653
+ * application` command to create applications in the `projects` directory.
551
654
  */
552
655
  createApplication?: boolean;
553
656
  /**
554
- * The directory name to create the workspace in.
657
+ * The directory where the new workspace and project should be created. If not specified,
658
+ * the workspace will be created in the current directory.
555
659
  */
556
660
  directory?: string;
557
661
  /**
558
- * Create an application that does not utilize zone.js.
662
+ * Create an initial application that does not utilize `zone.js`.
559
663
  */
560
664
  experimentalZoneless?: boolean;
561
665
  /**
562
- * Include styles inline in the component TS file. By default, an external styles file is
563
- * created and referenced in the component TypeScript file.
666
+ * Include the styles for the initial application's root component directly within the
667
+ * `app.component.ts` file. By default, a separate stylesheet file (e.g.,
668
+ * `app.component.css`) is created.
564
669
  */
565
670
  inlineStyle?: boolean;
566
671
  /**
567
- * Include template inline in the component TS file. By default, an external template file
568
- * is created and referenced in the component TypeScript file.
672
+ * Include the HTML template for the initial application's root component directly within
673
+ * the `app.component.ts` file. By default, a separate template file (e.g.,
674
+ * `app.component.html`) is created.
569
675
  */
570
676
  inlineTemplate?: boolean;
571
677
  /**
572
- * Create a workspace without any testing frameworks. (Use for learning purposes only.)
678
+ * Generate a minimal Angular workspace without any testing frameworks. This is intended for
679
+ * learning purposes and simple experimentation, not for production applications.
573
680
  */
574
681
  minimal?: boolean;
575
682
  /**
576
- * The name of the new workspace and initial project.
683
+ * The name for the new workspace and the initial project. This name will be used for the
684
+ * root directory and various identifiers throughout the project.
577
685
  */
578
686
  name: string;
579
687
  /**
580
- * The path where new projects will be created, relative to the new workspace root.
688
+ * The path where new projects will be created within the workspace, relative to the
689
+ * workspace root. By default, new projects are created in the `projects` directory.
581
690
  */
582
691
  newProjectRoot?: string;
583
692
  /**
@@ -585,33 +694,38 @@ export interface AngularNgNewOptionsSchema {
585
694
  */
586
695
  packageManager?: PackageManager;
587
696
  /**
588
- * The prefix to apply to generated selectors for the initial project.
697
+ * The prefix to apply to generated selectors for the initial project. For example, if the
698
+ * prefix is `my-app` and you generate a component named `my-component`, the selector will
699
+ * be `my-app-my-component`.
589
700
  */
590
701
  prefix?: string;
591
702
  /**
592
- * Enable routing in the initial project.
703
+ * Enable routing in the initial application project. This sets up the necessary files and
704
+ * modules for managing navigation between different views in your application.
593
705
  */
594
706
  routing?: boolean;
595
707
  /**
596
- * Creates a server application using the Server Routing and App Engine APIs (Developer
597
- * Preview).
708
+ * Create a server application in the initial project using the Server Routing and App
709
+ * Engine APIs (Developer Preview).
598
710
  */
599
711
  serverRouting?: boolean;
600
712
  /**
601
- * Do not initialize a git repository.
713
+ * Do not initialize a Git repository in the new workspace. By default, a Git repository is
714
+ * initialized to help you track changes to your project.
602
715
  */
603
716
  skipGit?: boolean;
604
717
  /**
605
- * Do not install dependency packages.
718
+ * Skip the automatic installation of packages. You will need to manually install the
719
+ * dependencies later.
606
720
  */
607
721
  skipInstall?: boolean;
608
722
  /**
609
- * Do not generate "spec.ts" test files for the new project.
723
+ * Skip the generation of unit test files `spec.ts`.
610
724
  */
611
725
  skipTests?: boolean;
612
726
  /**
613
- * Creates an application with Server-Side Rendering (SSR) and Static Site Generation
614
- * (SSG/Prerendering) enabled.
727
+ * Configure the initial application for Server-Side Rendering (SSR) and Static Site
728
+ * Generation (SSG/Prerendering).
615
729
  */
616
730
  ssr?: boolean;
617
731
  /**
@@ -619,13 +733,13 @@ export interface AngularNgNewOptionsSchema {
619
733
  */
620
734
  standalone?: boolean;
621
735
  /**
622
- * Creates a workspace with stricter type checking and stricter bundle budgets settings.
623
- * This setting helps improve maintainability and catch bugs ahead of time. For more
624
- * information, see https://angular.dev/tools/cli/template-typecheck#strict-mode
736
+ * Enable stricter type checking and stricter bundle budgets settings. This setting helps
737
+ * improve maintainability and catch bugs ahead of time. For more information, see
738
+ * https://angular.dev/tools/cli/template-typecheck#strict-mode
625
739
  */
626
740
  strict?: boolean;
627
741
  /**
628
- * The file extension or preprocessor to use for style files.
742
+ * The type of stylesheet files to be created for components in the initial project.
629
743
  */
630
744
  style?: SchematicsAngularApplicationStyle;
631
745
  /**
@@ -633,12 +747,15 @@ export interface AngularNgNewOptionsSchema {
633
747
  */
634
748
  version: string;
635
749
  /**
636
- * The view encapsulation strategy to use in the initial project.
750
+ * Sets the view encapsulation mode for components in the initial project. This determines
751
+ * how component styles are scoped and applied. Options include: `Emulated` (default, styles
752
+ * are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
753
+ * encapsulated using Shadow DOM).
637
754
  */
638
755
  viewEncapsulation?: ViewEncapsulation;
639
756
  }
640
757
  /**
641
- * Initial git repository commit information.
758
+ * Configure the initial Git commit for the new repository.
642
759
  */
643
760
  export type CommitUnion = boolean | CommitObject;
644
761
  export interface CommitObject {
@@ -648,119 +765,149 @@ export interface CommitObject {
648
765
  [property: string]: any;
649
766
  }
650
767
  /**
651
- * Creates a new, generic pipe definition in the given project.
768
+ * Creates a new pipe in your project. Pipes are used to transform data for display in
769
+ * templates. They take input values and apply a specific transformation, such as formatting
770
+ * dates, currency, or filtering arrays. This schematic generates the necessary files and
771
+ * boilerplate code for a new pipe.
652
772
  */
653
773
  export interface AngularPipeOptionsSchema {
654
774
  /**
655
- * The declaring NgModule exports this pipe.
775
+ * Automatically export the pipe from the specified NgModule, making it accessible to other
776
+ * modules in the application.
656
777
  */
657
778
  export?: boolean;
658
779
  /**
659
- * When true (the default) creates files at the top level of the project.
780
+ * Creates the new pipe files at the top level of the current project. If set to false, a
781
+ * new folder with the pipe's name will be created to contain the files.
660
782
  */
661
783
  flat?: boolean;
662
784
  /**
663
- * The declaring NgModule.
785
+ * Specify the NgModule where the pipe should be declared. If not provided, the CLI will
786
+ * attempt to find the closest NgModule in the pipe's path.
664
787
  */
665
788
  module?: string;
666
789
  /**
667
- * The name of the pipe.
790
+ * The name for the new pipe. This will be used to create the pipe's class and spec files
791
+ * (e.g., `my-pipe.pipe.ts` and `my-pipe.pipe.spec.ts`).
668
792
  */
669
793
  name: string;
670
794
  /**
671
- * The path at which to create the pipe, relative to the workspace root.
795
+ * The path where the pipe files should be created, relative to the workspace root. If not
796
+ * provided, the pipe will be created in the current directory.
672
797
  */
673
798
  path?: string;
674
799
  /**
675
- * The name of the project.
800
+ * The name of the project where the pipe should be created. If not specified, the CLI will
801
+ * determine the project from the current directory.
676
802
  */
677
803
  project: string;
678
804
  /**
679
- * Do not import this pipe into the owning NgModule.
805
+ * Do not automatically import the new pipe into its closest NgModule.
680
806
  */
681
807
  skipImport?: boolean;
682
808
  /**
683
- * Do not create "spec.ts" test files for the new pipe.
809
+ * Prevent the generation of a unit test file `spec.ts` for the new pipe.
684
810
  */
685
811
  skipTests?: boolean;
686
812
  /**
687
- * Whether the generated pipe is standalone.
813
+ * Generate a standalone pipe. Standalone pipes are self-contained and don't need to be
814
+ * declared in an NgModule. They can be used independently or imported directly into other
815
+ * standalone components, directives, or pipes.
688
816
  */
689
817
  standalone?: boolean;
690
818
  }
691
819
  /**
692
- * Generates a new, generic resolver definition in the given project.
820
+ * Creates a new resolver in your project. Resolvers are used to pre-fetch data before a
821
+ * route is activated, ensuring that the necessary data is available before the component is
822
+ * displayed. This can improve the user experience by preventing delays and loading states.
823
+ * This schematic generates a new resolver with the specified name and options.
693
824
  */
694
825
  export interface AngularResolverOptionsSchema {
695
826
  /**
696
- * When true (the default), creates the new files at the top level of the current project.
827
+ * Creates the new resolver files at the top level of the current project. If set to false,
828
+ * a new folder with the resolver's name will be created to contain the files.
697
829
  */
698
830
  flat?: boolean;
699
831
  /**
700
- * Creates the resolver as a `ResolveFn`.
832
+ * Creates the resolver as a function `ResolveFn` instead of a class. Functional resolvers
833
+ * can be simpler for basic scenarios.
701
834
  */
702
835
  functional?: boolean;
703
836
  /**
704
- * The name of the new resolver.
837
+ * The name for the new resolver. This will be used to create the resolver's class and spec
838
+ * files (e.g., `my-resolver.resolver.ts` and `my-resolver.resolver.spec.ts`).
705
839
  */
706
840
  name: string;
707
841
  /**
708
- * The path at which to create the interface that defines the resolver, relative to the
709
- * current workspace.
842
+ * The path where the resolver files should be created, relative to the current workspace.
843
+ * If not provided, the resolver will be created in the current directory.
710
844
  */
711
845
  path?: string;
712
846
  /**
713
- * The name of the project.
847
+ * The name of the project where the resolver should be created. If not specified, the CLI
848
+ * will determine the project from the current directory.
714
849
  */
715
850
  project: string;
716
851
  /**
717
- * Do not create "spec.ts" test files for the new resolver.
852
+ * Skip the generation of a unit test file `spec.ts` for the new resolver.
718
853
  */
719
854
  skipTests?: boolean;
720
855
  }
721
856
  /**
722
- * Creates a new, generic service definition in the given project.
857
+ * Creates a new service in your project. Services are used to encapsulate reusable logic,
858
+ * such as data access, API calls, or utility functions. This schematic simplifies the
859
+ * process of generating a new service with the necessary files and boilerplate code.
723
860
  */
724
861
  export interface AngularServiceOptionsSchema {
725
862
  /**
726
- * When true (the default), creates files at the top level of the project.
863
+ * Creates files at the top level of the project or the given path. If set to false, a new
864
+ * folder with the service's name will be created to contain the files.
727
865
  */
728
866
  flat?: boolean;
729
867
  /**
730
- * The name of the service.
868
+ * The name for the new service. This will be used to create the service's class and spec
869
+ * files (e.g., `my-service.service.ts` and `my-service.service.spec.ts`).
731
870
  */
732
871
  name: string;
733
872
  /**
734
- * The path at which to create the service, relative to the workspace root.
873
+ * The path where the service files should be created, relative to the workspace root. If
874
+ * not provided, the service will be created in the project's `src/app` directory.
735
875
  */
736
876
  path?: string;
737
877
  /**
738
- * The name of the project.
878
+ * The name of the project where the service should be added. If not specified, the CLI will
879
+ * determine the project from the current directory.
739
880
  */
740
881
  project: string;
741
882
  /**
742
- * Do not create "spec.ts" test files for the new service.
883
+ * Skip the generation of a unit test file `spec.ts` for the service.
743
884
  */
744
885
  skipTests?: boolean;
745
886
  }
746
887
  /**
747
- * Creates a new, generic web worker definition in the given project.
888
+ * Creates a new web worker in your project. Web workers allow you to run JavaScript code in
889
+ * the background, improving the performance and responsiveness of your application by
890
+ * offloading computationally intensive tasks. This schematic generates the necessary files
891
+ * for a new web worker and provides an optional code snippet to demonstrate its usage.
748
892
  */
749
893
  export interface AngularWebWorkerOptionsSchema {
750
894
  /**
751
- * The name of the worker.
895
+ * The name for the new web worker. This will be used to create the worker file (e.g.,
896
+ * `my-worker.worker.ts`).
752
897
  */
753
898
  name: string;
754
899
  /**
755
- * The path at which to create the worker file, relative to the current workspace.
900
+ * The path where the web worker file should be created, relative to the current workspace.
901
+ * If not specified, the worker will be created in the current directory.
756
902
  */
757
903
  path?: string;
758
904
  /**
759
- * The name of the project.
905
+ * The name of the project where the web worker should be created. If not specified, the CLI
906
+ * will determine the project from the current directory.
760
907
  */
761
908
  project: string;
762
909
  /**
763
- * Add a worker creation snippet in a sibling file of the same name.
910
+ * Generate a code snippet that demonstrates how to create and use the new web worker.
764
911
  */
765
912
  snippet?: boolean;
766
913
  }