schema.d.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * Creates a new library project in your Angular workspace. Libraries are reusable
  3. * collections of components, services, and other Angular artifacts that can be shared
  4. * across multiple applications. This schematic simplifies the process of generating a new
  5. * library with the necessary files and configurations.
  6. */
  7. export type Schema = {
  8. /**
  9. * The path to the library's public API file, relative to the workspace root. This file
  10. * defines what parts of the library are accessible to applications that import it.
  11. */
  12. entryFile?: string;
  13. /**
  14. * The name for the new library. This name will be used for the project directory and
  15. * various identifiers within the library's code.
  16. */
  17. name: string;
  18. /**
  19. * A prefix to be added to the selectors of components generated within this library. For
  20. * example, if the prefix is `my-lib` and you generate a component named `my-component`, the
  21. * selector will be `my-lib-my-component`.
  22. */
  23. prefix?: string;
  24. /**
  25. * The root directory for the new library, relative to the workspace root. If not specified,
  26. * the library will be created in a subfolder within the `projects` directory, using the
  27. * library's name.
  28. */
  29. projectRoot?: string;
  30. /**
  31. * Skip the automatic installation of packages. You will need to manually install the
  32. * dependencies later.
  33. */
  34. skipInstall?: boolean;
  35. /**
  36. * Do not automatically add dependencies to the `package.json` file.
  37. */
  38. skipPackageJson?: boolean;
  39. /**
  40. * Do not update the workspace `tsconfig.json` file to add a path mapping for the new
  41. * library. The path mapping is needed to use the library in an application, but can be
  42. * disabled here to simplify development.
  43. */
  44. skipTsConfig?: boolean;
  45. /**
  46. * Create a library that utilizes the standalone API, eliminating the need for NgModules.
  47. * This can simplify the structure of your library and its usage in applications.
  48. */
  49. standalone?: boolean;
  50. };