options.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {
  2. "definitions": {
  3. "ObjectPattern": {
  4. "type": "object",
  5. "additionalProperties": false,
  6. "properties": {
  7. "from": {
  8. "type": "string",
  9. "description": "Glob or path from where we copy files.",
  10. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#from",
  11. "minLength": 1
  12. },
  13. "to": {
  14. "anyOf": [
  15. {
  16. "type": "string"
  17. },
  18. {
  19. "instanceof": "Function"
  20. }
  21. ],
  22. "description": "Output path.",
  23. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#to"
  24. },
  25. "context": {
  26. "type": "string",
  27. "description": "A path that determines how to interpret the 'from' path.",
  28. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#context"
  29. },
  30. "globOptions": {
  31. "type": "object",
  32. "description": "Allows to configure the glob pattern matching library used by the plugin.",
  33. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#globoptions"
  34. },
  35. "filter": {
  36. "instanceof": "Function",
  37. "description": "Allows to filter copied assets.",
  38. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#filter"
  39. },
  40. "transformAll": {
  41. "instanceof": "Function",
  42. "description": "Allows you to modify the contents of multiple files and save the result to one file.",
  43. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#transformall"
  44. },
  45. "toType": {
  46. "enum": ["dir", "file", "template"],
  47. "description": "Determinate what is to option - directory, file or template.",
  48. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#totype"
  49. },
  50. "force": {
  51. "type": "boolean",
  52. "description": "Overwrites files already in 'compilation.assets' (usually added by other plugins/loaders).",
  53. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#force"
  54. },
  55. "priority": {
  56. "type": "number",
  57. "description": "Allows to specify the priority of copying files with the same destination name.",
  58. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#priority"
  59. },
  60. "info": {
  61. "anyOf": [
  62. {
  63. "type": "object"
  64. },
  65. {
  66. "instanceof": "Function"
  67. }
  68. ],
  69. "description": "Allows to add assets info.",
  70. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#info"
  71. },
  72. "transform": {
  73. "description": "Allows to modify the file contents.",
  74. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#transform",
  75. "anyOf": [
  76. {
  77. "instanceof": "Function"
  78. },
  79. {
  80. "type": "object",
  81. "additionalProperties": false,
  82. "properties": {
  83. "transformer": {
  84. "instanceof": "Function",
  85. "description": "Allows to modify the file contents.",
  86. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#transformer"
  87. },
  88. "cache": {
  89. "description": "Enables/disables and configure caching.",
  90. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#cache",
  91. "anyOf": [
  92. {
  93. "type": "boolean"
  94. },
  95. {
  96. "type": "object",
  97. "additionalProperties": false,
  98. "properties": {
  99. "keys": {
  100. "anyOf": [
  101. {
  102. "type": "object",
  103. "additionalProperties": true
  104. },
  105. {
  106. "instanceof": "Function"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. ]
  113. }
  114. }
  115. }
  116. ]
  117. },
  118. "noErrorOnMissing": {
  119. "type": "boolean",
  120. "description": "Doesn't generate an error on missing file(s).",
  121. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#noerroronmissing"
  122. }
  123. },
  124. "required": ["from"]
  125. },
  126. "StringPattern": {
  127. "type": "string",
  128. "minLength": 1
  129. }
  130. },
  131. "type": "object",
  132. "additionalProperties": false,
  133. "properties": {
  134. "patterns": {
  135. "type": "array",
  136. "minItems": 1,
  137. "items": {
  138. "anyOf": [
  139. {
  140. "$ref": "#/definitions/StringPattern"
  141. },
  142. {
  143. "$ref": "#/definitions/ObjectPattern"
  144. }
  145. ]
  146. }
  147. },
  148. "options": {
  149. "type": "object",
  150. "additionalProperties": false,
  151. "properties": {
  152. "concurrency": {
  153. "type": "number",
  154. "description": "Limits the number of simultaneous requests to fs.",
  155. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#concurrency"
  156. }
  157. }
  158. }
  159. },
  160. "required": ["patterns"]
  161. }