BannerPlugin.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {
  2. "definitions": {
  3. "rule": {
  4. "oneOf": [
  5. {
  6. "instanceof": "RegExp"
  7. },
  8. {
  9. "minLength": 1,
  10. "type": "string"
  11. }
  12. ]
  13. },
  14. "rules": {
  15. "oneOf": [
  16. {
  17. "items": {
  18. "description": "A rule condition",
  19. "anyOf": [
  20. {
  21. "$ref": "#/definitions/rule"
  22. }
  23. ]
  24. },
  25. "type": "array"
  26. },
  27. {
  28. "$ref": "#/definitions/rule"
  29. }
  30. ]
  31. }
  32. },
  33. "oneOf": [
  34. {
  35. "type": "object",
  36. "additionalProperties": false,
  37. "required": [
  38. "banner"
  39. ],
  40. "properties": {
  41. "banner": {
  42. "description": "Specifies the banner",
  43. "anyOf": [
  44. {
  45. "instanceof": "Function"
  46. },
  47. {
  48. "type": "string"
  49. }
  50. ]
  51. },
  52. "raw": {
  53. "description": "If true, banner will not be wrapped in a comment",
  54. "type": "boolean"
  55. },
  56. "entryOnly": {
  57. "description": "If true, the banner will only be added to the entry chunks",
  58. "type": "boolean"
  59. },
  60. "test": {
  61. "description": "Include all modules that pass test assertion",
  62. "anyOf": [
  63. {
  64. "$ref": "#/definitions/rules"
  65. }
  66. ]
  67. },
  68. "include": {
  69. "description": "Include all modules matching any of these conditions",
  70. "anyOf": [
  71. {
  72. "$ref": "#/definitions/rules"
  73. }
  74. ]
  75. },
  76. "exclude": {
  77. "description": "Exclude all modules matching any of these conditions",
  78. "anyOf": [
  79. {
  80. "$ref": "#/definitions/rules"
  81. }
  82. ]
  83. }
  84. }
  85. },
  86. {
  87. "description": "The banner as function, it will be wrapped in a comment",
  88. "instanceof": "Function"
  89. },
  90. {
  91. "description": "The banner as string, it will be wrapped in a comment",
  92. "minLength": 1,
  93. "type": "string"
  94. }
  95. ]
  96. }