BannerPlugin.json 2.6 KB

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