schema.d.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /**
  2. * Generates a new Angular application within your workspace. This schematic sets up the
  3. * foundational structure of your project, including the root component, module, and
  4. * configuration files. You can customize various aspects of the application, such as
  5. * routing, styling, and testing.
  6. */
  7. export type Schema = {
  8. /**
  9. * Include the styles for the root component directly within the `app.component.ts` file.
  10. * Only CSS styles can be included inline. By default, a separate stylesheet file (e.g.,
  11. * `app.component.css`) is created.
  12. */
  13. inlineStyle?: boolean;
  14. /**
  15. * Include the HTML template for the root component directly within the `app.component.ts`
  16. * file. By default, a separate template file (e.g., `app.component.html`) is created.
  17. */
  18. inlineTemplate?: boolean;
  19. /**
  20. * Generate a minimal project without any testing frameworks. This is intended for learning
  21. * purposes and simple experimentation, not for production applications.
  22. */
  23. minimal?: boolean;
  24. /**
  25. * The name for the new application. This name will be used for the project directory and
  26. * various identifiers throughout the application's code.
  27. */
  28. name: string;
  29. /**
  30. * A prefix to be added to the selectors of components generated within this application.
  31. * For example, if the prefix is `my-app` and you generate a component named `my-component`,
  32. * the selector will be `my-app-my-component`.
  33. */
  34. prefix?: string;
  35. /**
  36. * The directory where the new application's files will be created, relative to the
  37. * workspace root. If not specified, the application will be created in a subfolder within
  38. * the `projects` directory, using the application's name.
  39. */
  40. projectRoot?: string;
  41. /**
  42. * Generate an application with routing already configured. This sets up the necessary files
  43. * and modules for managing navigation between different views in your application.
  44. */
  45. routing?: boolean;
  46. /**
  47. * Skip the automatic installation of packages. You will need to manually install the
  48. * dependencies later.
  49. */
  50. skipInstall?: boolean;
  51. /**
  52. * Do not add dependencies to the `package.json` file.
  53. */
  54. skipPackageJson?: boolean;
  55. /**
  56. * Skip the generation of a unit test files `spec.ts`.
  57. */
  58. skipTests?: boolean;
  59. /**
  60. * Configure the application for Server-Side Rendering (SSR) and Static Site Generation
  61. * (SSG/Prerendering).
  62. */
  63. ssr?: boolean;
  64. /**
  65. * Create an application that utilizes the standalone API, eliminating the need for
  66. * NgModules. This can simplify the structure of your application.
  67. */
  68. standalone?: boolean;
  69. /**
  70. * Enable stricter bundle budget settings for the application. This helps to keep your
  71. * application's bundle size small and improve performance. For more information, see
  72. * https://angular.dev/tools/cli/template-typecheck#strict-mode
  73. */
  74. strict?: boolean;
  75. /**
  76. * The type of stylesheet files to be created for components in the application.
  77. */
  78. style?: Style;
  79. /**
  80. * Sets the view encapsulation mode for the application's components. This determines how
  81. * component styles are scoped and applied.
  82. */
  83. viewEncapsulation?: ViewEncapsulation;
  84. /**
  85. * Generate an application that does not use `zone.js`.
  86. */
  87. zoneless?: boolean;
  88. };
  89. /**
  90. * The type of stylesheet files to be created for components in the application.
  91. */
  92. export declare enum Style {
  93. Css = "css",
  94. Less = "less",
  95. Sass = "sass",
  96. Scss = "scss"
  97. }
  98. /**
  99. * Sets the view encapsulation mode for the application's components. This determines how
  100. * component styles are scoped and applied.
  101. */
  102. export declare enum ViewEncapsulation {
  103. Emulated = "Emulated",
  104. None = "None",
  105. ShadowDom = "ShadowDom"
  106. }