schema.json 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema",
  3. "$id": "SchematicsMaterialTree",
  4. "title": "Material Tree Options Schema",
  5. "type": "object",
  6. "properties": {
  7. "path": {
  8. "type": "string",
  9. "format": "path",
  10. "$default": {
  11. "$source": "workingDirectory"
  12. },
  13. "description": "The path to create the component.",
  14. "visible": false
  15. },
  16. "project": {
  17. "type": "string",
  18. "description": "The name of the project.",
  19. "$default": {
  20. "$source": "projectName"
  21. }
  22. },
  23. "name": {
  24. "type": "string",
  25. "description": "The name of the component.",
  26. "$default": {
  27. "$source": "argv",
  28. "index": 0
  29. },
  30. "x-prompt": "What should be the name of the component?"
  31. },
  32. "inlineStyle": {
  33. "description": "Specifies if the style will be in the ts file.",
  34. "type": "boolean",
  35. "alias": "s"
  36. },
  37. "inlineTemplate": {
  38. "description": "Specifies if the template will be in the ts file.",
  39. "type": "boolean",
  40. "alias": "t"
  41. },
  42. "standalone": {
  43. "description": "Whether the generated component is standalone.",
  44. "type": "boolean"
  45. },
  46. "viewEncapsulation": {
  47. "description": "Specifies the view encapsulation strategy.",
  48. "enum": ["Emulated", "None"],
  49. "type": "string",
  50. "alias": "v"
  51. },
  52. "changeDetection": {
  53. "description": "Specifies the change detection strategy.",
  54. "enum": ["Default", "OnPush"],
  55. "type": "string",
  56. "default": "Default",
  57. "alias": "c"
  58. },
  59. "prefix": {
  60. "type": "string",
  61. "format": "html-selector",
  62. "description": "The prefix to apply to generated selectors.",
  63. "alias": "p"
  64. },
  65. "style": {
  66. "description": "The file extension to be used for style files.",
  67. "type": "string"
  68. },
  69. "skipTests": {
  70. "type": "boolean",
  71. "description": "When true, does not generate a test file."
  72. },
  73. "flat": {
  74. "type": "boolean",
  75. "description": "Flag to indicate if a dir is created.",
  76. "default": false
  77. },
  78. "skipImport": {
  79. "type": "boolean",
  80. "description": "Flag to skip the module import.",
  81. "default": false
  82. },
  83. "selector": {
  84. "type": "string",
  85. "format": "html-selector",
  86. "description": "The selector to use for the component."
  87. },
  88. "module": {
  89. "type": "string",
  90. "description": "Allows specification of the declaring module.",
  91. "alias": "m"
  92. },
  93. "export": {
  94. "type": "boolean",
  95. "default": false,
  96. "description": "Specifies if declaring module exports the component."
  97. }
  98. },
  99. "required": ["name"]
  100. }