schema.d.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /**
  2. * Creates a new, generic component definition in the given project.
  3. */
  4. export interface Schema {
  5. /**
  6. * The change detection strategy to use in the new component.
  7. */
  8. changeDetection?: ChangeDetection;
  9. /**
  10. * Specifies if the style will contain `:host { display: block; }`.
  11. */
  12. displayBlock?: boolean;
  13. /**
  14. * The declaring NgModule exports this component.
  15. */
  16. export?: boolean;
  17. /**
  18. * Create the new files at the top level of the current project.
  19. */
  20. flat?: boolean;
  21. /**
  22. * Include styles inline in the component.ts file. Only CSS styles can be included inline.
  23. * By default, an external styles file is created and referenced in the component.ts file.
  24. */
  25. inlineStyle?: boolean;
  26. /**
  27. * Include template inline in the component.ts file. By default, an external template file
  28. * is created and referenced in the component.ts file.
  29. */
  30. inlineTemplate?: boolean;
  31. /**
  32. * The declaring NgModule.
  33. */
  34. module?: string;
  35. /**
  36. * The name of the component.
  37. */
  38. name: string;
  39. /**
  40. * The path at which to create the component file, relative to the current workspace.
  41. * Default is a folder with the same name as the component in the project root.
  42. */
  43. path?: string;
  44. /**
  45. * The prefix to apply to the generated component selector.
  46. */
  47. prefix?: string;
  48. /**
  49. * The name of the project.
  50. */
  51. project: string;
  52. /**
  53. * The HTML selector to use for this component.
  54. */
  55. selector?: string;
  56. /**
  57. * Do not import this component into the owning NgModule.
  58. */
  59. skipImport?: boolean;
  60. /**
  61. * Specifies if the component should have a selector or not.
  62. */
  63. skipSelector?: boolean;
  64. /**
  65. * Do not create "spec.ts" test files for the new component.
  66. */
  67. skipTests?: boolean;
  68. /**
  69. * Whether the generated component is standalone.
  70. */
  71. standalone?: boolean;
  72. /**
  73. * The file extension or preprocessor to use for style files, or 'none' to skip generating
  74. * the style file.
  75. */
  76. style?: Style;
  77. /**
  78. * Adds a developer-defined type to the filename, in the format "name.type.ts".
  79. */
  80. type?: string;
  81. /**
  82. * The view encapsulation strategy to use in the new component.
  83. */
  84. viewEncapsulation?: ViewEncapsulation;
  85. }
  86. /**
  87. * The change detection strategy to use in the new component.
  88. */
  89. export declare enum ChangeDetection {
  90. Default = "Default",
  91. OnPush = "OnPush"
  92. }
  93. /**
  94. * The file extension or preprocessor to use for style files, or 'none' to skip generating
  95. * the style file.
  96. */
  97. export declare enum Style {
  98. Css = "css",
  99. Less = "less",
  100. None = "none",
  101. Sass = "sass",
  102. Scss = "scss"
  103. }
  104. /**
  105. * The view encapsulation strategy to use in the new component.
  106. */
  107. export declare enum ViewEncapsulation {
  108. Emulated = "Emulated",
  109. None = "None",
  110. ShadowDom = "ShadowDom"
  111. }