schema.d.ts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /**
  2. * Creates a new Angular workspace and an initial project. This schematic sets up the
  3. * foundation for your Angular development, generating the workspace configuration files and
  4. * an optional starter application. You can customize various aspects of the workspace and
  5. * the initial project, such as routing, styling, and testing.
  6. */
  7. export type Schema = {
  8. /**
  9. * Configure the initial Git commit for the new repository.
  10. */
  11. commit?: CommitUnion;
  12. /**
  13. * Create a new initial application project in the new workspace. When false, creates an
  14. * empty workspace with no initial application. You can then use the `ng generate
  15. * application` command to create applications in the `projects` directory.
  16. */
  17. createApplication?: boolean;
  18. /**
  19. * The directory where the new workspace and project should be created. If not specified,
  20. * the workspace will be created in the current directory.
  21. */
  22. directory?: string;
  23. /**
  24. * Create an initial application that does not utilize `zone.js`.
  25. */
  26. experimentalZoneless?: boolean;
  27. /**
  28. * Include the styles for the initial application's root component directly within the
  29. * `app.component.ts` file. By default, a separate stylesheet file (e.g.,
  30. * `app.component.css`) is created.
  31. */
  32. inlineStyle?: boolean;
  33. /**
  34. * Include the HTML template for the initial application's root component directly within
  35. * the `app.component.ts` file. By default, a separate template file (e.g.,
  36. * `app.component.html`) is created.
  37. */
  38. inlineTemplate?: boolean;
  39. /**
  40. * Generate a minimal Angular workspace without any testing frameworks. This is intended for
  41. * learning purposes and simple experimentation, not for production applications.
  42. */
  43. minimal?: boolean;
  44. /**
  45. * The name for the new workspace and the initial project. This name will be used for the
  46. * root directory and various identifiers throughout the project.
  47. */
  48. name: string;
  49. /**
  50. * The path where new projects will be created within the workspace, relative to the
  51. * workspace root. By default, new projects are created in the `projects` directory.
  52. */
  53. newProjectRoot?: string;
  54. /**
  55. * The package manager used to install dependencies.
  56. */
  57. packageManager?: PackageManager;
  58. /**
  59. * The prefix to apply to generated selectors for the initial project. For example, if the
  60. * prefix is `my-app` and you generate a component named `my-component`, the selector will
  61. * be `my-app-my-component`.
  62. */
  63. prefix?: string;
  64. /**
  65. * Enable routing in the initial application project. This sets up the necessary files and
  66. * modules for managing navigation between different views in your application.
  67. */
  68. routing?: boolean;
  69. /**
  70. * Create a server application in the initial project using the Server Routing and App
  71. * Engine APIs (Developer Preview).
  72. */
  73. serverRouting?: boolean;
  74. /**
  75. * Do not initialize a Git repository in the new workspace. By default, a Git repository is
  76. * initialized to help you track changes to your project.
  77. */
  78. skipGit?: boolean;
  79. /**
  80. * Skip the automatic installation of packages. You will need to manually install the
  81. * dependencies later.
  82. */
  83. skipInstall?: boolean;
  84. /**
  85. * Skip the generation of unit test files `spec.ts`.
  86. */
  87. skipTests?: boolean;
  88. /**
  89. * Configure the initial application for Server-Side Rendering (SSR) and Static Site
  90. * Generation (SSG/Prerendering).
  91. */
  92. ssr?: boolean;
  93. /**
  94. * Creates an application based upon the standalone API, without NgModules.
  95. */
  96. standalone?: boolean;
  97. /**
  98. * Enable stricter type checking and stricter bundle budgets settings. This setting helps
  99. * improve maintainability and catch bugs ahead of time. For more information, see
  100. * https://angular.dev/tools/cli/template-typecheck#strict-mode
  101. */
  102. strict?: boolean;
  103. /**
  104. * The type of stylesheet files to be created for components in the initial project.
  105. */
  106. style?: Style;
  107. /**
  108. * The version of the Angular CLI to use.
  109. */
  110. version: string;
  111. /**
  112. * Sets the view encapsulation mode for components in the initial project. This determines
  113. * how component styles are scoped and applied. Options include: `Emulated` (default, styles
  114. * are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
  115. * encapsulated using Shadow DOM).
  116. */
  117. viewEncapsulation?: ViewEncapsulation;
  118. };
  119. /**
  120. * Configure the initial Git commit for the new repository.
  121. */
  122. export type CommitUnion = boolean | CommitObject;
  123. export type CommitObject = {
  124. email: string;
  125. message?: string;
  126. name: string;
  127. [property: string]: any;
  128. };
  129. /**
  130. * The package manager used to install dependencies.
  131. */
  132. export declare enum PackageManager {
  133. Bun = "bun",
  134. Cnpm = "cnpm",
  135. Npm = "npm",
  136. Pnpm = "pnpm",
  137. Yarn = "yarn"
  138. }
  139. /**
  140. * The type of stylesheet files to be created for components in the initial project.
  141. */
  142. export declare enum Style {
  143. Css = "css",
  144. Less = "less",
  145. Sass = "sass",
  146. Scss = "scss"
  147. }
  148. /**
  149. * Sets the view encapsulation mode for components in the initial project. This determines
  150. * how component styles are scoped and applied. Options include: `Emulated` (default, styles
  151. * are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
  152. * encapsulated using Shadow DOM).
  153. */
  154. export declare enum ViewEncapsulation {
  155. Emulated = "Emulated",
  156. None = "None",
  157. ShadowDom = "ShadowDom"
  158. }