schema.d.ts 5.4 KB

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