options.json 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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 configute 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. "transformPath": {
  119. "instanceof": "Function"
  120. },
  121. "noErrorOnMissing": {
  122. "type": "boolean",
  123. "description": "Doesn't generate an error on missing file(s).",
  124. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#noerroronmissing"
  125. }
  126. },
  127. "required": ["from"]
  128. },
  129. "StringPattern": {
  130. "type": "string",
  131. "minLength": 1
  132. }
  133. },
  134. "type": "object",
  135. "additionalProperties": false,
  136. "properties": {
  137. "patterns": {
  138. "type": "array",
  139. "minItems": 1,
  140. "items": {
  141. "anyOf": [
  142. {
  143. "$ref": "#/definitions/StringPattern"
  144. },
  145. {
  146. "$ref": "#/definitions/ObjectPattern"
  147. }
  148. ]
  149. }
  150. },
  151. "options": {
  152. "type": "object",
  153. "additionalProperties": false,
  154. "properties": {
  155. "concurrency": {
  156. "type": "number",
  157. "description": "Limits the number of simultaneous requests to fs.",
  158. "link": "https://github.com/webpack-contrib/copy-webpack-plugin#concurrency"
  159. }
  160. }
  161. }
  162. },
  163. "required": ["patterns"]
  164. }