schema.d.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * Creates a new pipe in your project. Pipes are used to transform data for display in
  3. * templates. They take input values and apply a specific transformation, such as formatting
  4. * dates, currency, or filtering arrays. This schematic generates the necessary files and
  5. * boilerplate code for a new pipe.
  6. */
  7. export type Schema = {
  8. /**
  9. * Automatically export the pipe from the specified NgModule, making it accessible to other
  10. * modules in the application.
  11. */
  12. export?: boolean;
  13. /**
  14. * Creates the new pipe files at the top level of the current project. If set to false, a
  15. * new folder with the pipe's name will be created to contain the files.
  16. */
  17. flat?: boolean;
  18. /**
  19. * Specify the NgModule where the pipe should be declared. If not provided, the CLI will
  20. * attempt to find the closest NgModule in the pipe's path.
  21. */
  22. module?: string;
  23. /**
  24. * The name for the new pipe. This will be used to create the pipe's class and spec files
  25. * (e.g., `my-pipe.pipe.ts` and `my-pipe.pipe.spec.ts`).
  26. */
  27. name: string;
  28. /**
  29. * The path where the pipe files should be created, relative to the workspace root. If not
  30. * provided, the pipe will be created in the current directory.
  31. */
  32. path?: string;
  33. /**
  34. * The name of the project where the pipe should be created. If not specified, the CLI will
  35. * determine the project from the current directory.
  36. */
  37. project: string;
  38. /**
  39. * Do not automatically import the new pipe into its closest NgModule.
  40. */
  41. skipImport?: boolean;
  42. /**
  43. * Prevent the generation of a unit test file `spec.ts` for the new pipe.
  44. */
  45. skipTests?: boolean;
  46. /**
  47. * Generate a standalone pipe. Standalone pipes are self-contained and don't need to be
  48. * declared in an NgModule. They can be used independently or imported directly into other
  49. * standalone components, directives, or pipes.
  50. */
  51. standalone?: boolean;
  52. };