schema.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema",
  3. "$id": "PLACEHOLDER_SCHEMATICS_ID",
  4. "title": "PLACEHOLDER_SCHEMATICS_TITLE",
  5. "type": "object",
  6. "properties": {
  7. "path": {
  8. "type": "string",
  9. "format": "path",
  10. "description": "The path to create the component.",
  11. "visible": false
  12. },
  13. "project": {
  14. "type": "string",
  15. "description": "The name of the project.",
  16. "$default": {
  17. "$source": "projectName"
  18. }
  19. },
  20. "name": {
  21. "type": "string",
  22. "description": "The name of the component.",
  23. "$default": {
  24. "$source": "argv",
  25. "index": 0
  26. },
  27. "x-prompt": "What should be the name of the component?"
  28. },
  29. "displayBlock": {
  30. "description": "Specifies if the style will contain `:host { display: block; }`.",
  31. "type": "boolean",
  32. "default": false,
  33. "alias": "b"
  34. },
  35. "inlineStyle": {
  36. "description": "When true, includes styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.",
  37. "type": "boolean",
  38. "default": false,
  39. "alias": "s"
  40. },
  41. "inlineTemplate": {
  42. "description": "When true, includes template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
  43. "type": "boolean",
  44. "default": false,
  45. "alias": "t"
  46. },
  47. "standalone": {
  48. "description": "Whether the generated component is standalone.",
  49. "type": "boolean",
  50. "default": true
  51. },
  52. "viewEncapsulation": {
  53. "description": "The view encapsulation strategy to use in the new component.",
  54. "enum": ["Emulated", "Native", "None", "ShadowDom"],
  55. "type": "string",
  56. "alias": "v"
  57. },
  58. "changeDetection": {
  59. "description": "Specifies the change detection strategy.",
  60. "enum": ["Default", "OnPush"],
  61. "type": "string",
  62. "default": "Default",
  63. "alias": "c"
  64. },
  65. "prefix": {
  66. "type": "string",
  67. "description": "The prefix to apply to the generated component selector.",
  68. "alias": "p",
  69. "oneOf": [
  70. {
  71. "maxLength": 0
  72. },
  73. {
  74. "minLength": 1,
  75. "format": "html-selector"
  76. }
  77. ]
  78. },
  79. "style": {
  80. "description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.",
  81. "type": "string",
  82. "default": "css",
  83. "enum": [
  84. "css",
  85. "scss",
  86. "sass",
  87. "less",
  88. "styl",
  89. "none"
  90. ]
  91. },
  92. "skipTests": {
  93. "type": "boolean",
  94. "description": "When true, does not create \"spec.ts\" test files for the new component.",
  95. "default": false
  96. },
  97. "flat": {
  98. "type": "boolean",
  99. "description": "Flag to indicate if a dir is created.",
  100. "default": false
  101. },
  102. "skipImport": {
  103. "type": "boolean",
  104. "description": "When true, does not import this component into the owning NgModule.",
  105. "default": false
  106. },
  107. "selector": {
  108. "type": "string",
  109. "format": "html-selector",
  110. "description": "The selector to use for the component."
  111. },
  112. "module": {
  113. "type": "string",
  114. "description": "Allows specification of the declaring module.",
  115. "alias": "m"
  116. },
  117. "export": {
  118. "type": "boolean",
  119. "default": false,
  120. "description": "When true, the declaring NgModule exports this component."
  121. },
  122. "entryComponent": {
  123. "type": "boolean",
  124. "default": false,
  125. "description": "When true, the new component is the entry component of the declaring NgModule."
  126. },
  127. "classnameWithModule": {
  128. "type": "boolean",
  129. "description": "When true, Use module class name as additional prefix for the component classname.",
  130. "default": false
  131. }
  132. },
  133. "required": [
  134. "name"
  135. ]
  136. }