schema.json 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {
  2. "$schema": "http://json-schema.org/schema",
  3. "id": "SchematicsAngularDirective",
  4. "title": "Angular Directive Options Schema",
  5. "type": "object",
  6. "description": "Creates a new generic directive definition in the given or default project.",
  7. "properties": {
  8. "name": {
  9. "type": "string",
  10. "description": "The name of the new directive.",
  11. "$default": {
  12. "$source": "argv",
  13. "index": 0
  14. },
  15. "x-prompt": "What name would you like to use for the directive?"
  16. },
  17. "path": {
  18. "type": "string",
  19. "format": "path",
  20. "description": "The path at which to create the interface that defines the directive, relative to the workspace root.",
  21. "visible": false
  22. },
  23. "project": {
  24. "type": "string",
  25. "description": "The name of the project.",
  26. "$default": {
  27. "$source": "projectName"
  28. }
  29. },
  30. "prefix": {
  31. "type": "string",
  32. "description": "A prefix to apply to generated selectors.",
  33. "alias": "p",
  34. "oneOf": [
  35. {
  36. "maxLength": 0
  37. },
  38. {
  39. "minLength": 1,
  40. "format": "html-selector"
  41. }
  42. ]
  43. },
  44. "skipTests": {
  45. "type": "boolean",
  46. "description": "When true, does not create \"spec.ts\" test files for the new class.",
  47. "default": false,
  48. "x-user-analytics": 12
  49. },
  50. "skipImport": {
  51. "type": "boolean",
  52. "description": "When true, does not import this directive into the owning NgModule.",
  53. "default": false,
  54. "x-user-analytics": 18
  55. },
  56. "selector": {
  57. "type": "string",
  58. "format": "html-selector",
  59. "description": "The HTML selector to use for this directive."
  60. },
  61. "flat": {
  62. "type": "boolean",
  63. "description": "When true (the default), creates the new files at the top level of the current project.",
  64. "default": true
  65. },
  66. "module": {
  67. "type": "string",
  68. "description": "The declaring NgModule.",
  69. "alias": "m"
  70. },
  71. "export": {
  72. "type": "boolean",
  73. "default": false,
  74. "description": "When true, the declaring NgModule exports this directive.",
  75. "x-user-analytics": 19
  76. },
  77. "lintFix": {
  78. "type": "boolean",
  79. "default": false,
  80. "description": "When true, applies lint fixes after generating the directive.",
  81. "x-user-analytics": 15
  82. }
  83. },
  84. "required": [
  85. "name"
  86. ]
  87. }