webpack/schemas/plugins/BannerPlugin.json

104 lines
2.5 KiB
JSON
Raw Permalink Normal View History

2017-10-28 05:23:38 +08:00
{
2017-11-19 18:45:15 +08:00
"definitions": {
2018-09-21 18:11:12 +08:00
"BannerFunction": {
"description": "The banner as function, it will be wrapped in a comment.",
2018-09-21 18:11:12 +08:00
"instanceof": "Function",
"tsType": "(data: { hash: string, chunk: import('../../lib/Chunk'), filename: string }) => string"
2018-09-21 18:11:12 +08:00
},
"Rule": {
"description": "Filtering rule as regex or string.",
"anyOf": [
2017-11-19 18:45:15 +08:00
{
2018-09-21 18:14:33 +08:00
"instanceof": "RegExp",
"tsType": "RegExp"
2017-11-19 18:45:15 +08:00
},
{
2018-09-21 17:54:35 +08:00
"type": "string",
"minLength": 1
2017-11-19 18:45:15 +08:00
}
]
},
2018-09-21 18:11:12 +08:00
"Rules": {
"description": "Filtering rules.",
"anyOf": [
2017-11-19 18:45:15 +08:00
{
2018-09-21 17:54:35 +08:00
"type": "array",
2017-11-19 18:45:15 +08:00
"items": {
"description": "A rule condition.",
"oneOf": [
2017-11-19 20:31:33 +08:00
{
2018-09-21 18:11:12 +08:00
"$ref": "#/definitions/Rule"
2017-11-19 20:31:33 +08:00
}
]
2018-09-21 17:54:35 +08:00
}
2017-11-19 18:45:15 +08:00
},
{
2018-09-21 18:11:12 +08:00
"$ref": "#/definitions/Rule"
2017-11-19 18:45:15 +08:00
}
]
}
},
2018-09-21 18:11:12 +08:00
"title": "BannerPluginArgument",
"anyOf": [
{
"description": "The banner as string, it will be wrapped in a comment.",
"type": "string",
"minLength": 1
},
2017-11-19 18:45:15 +08:00
{
2018-09-21 18:11:12 +08:00
"title": "BannerPluginOptions",
2017-11-19 18:45:15 +08:00
"type": "object",
"additionalProperties": false,
"properties": {
"banner": {
"description": "Specifies the banner.",
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/BannerFunction"
}
]
2017-11-19 18:45:15 +08:00
},
"entryOnly": {
"description": "If true, the banner will only be added to the entry chunks.",
2017-11-19 18:45:15 +08:00
"type": "boolean"
},
2018-09-21 17:54:35 +08:00
"exclude": {
"description": "Exclude all modules matching any of these conditions.",
"oneOf": [
2017-11-19 20:31:33 +08:00
{
2018-09-21 18:11:12 +08:00
"$ref": "#/definitions/Rules"
2017-11-19 20:31:33 +08:00
}
]
2017-11-19 18:45:15 +08:00
},
"include": {
"description": "Include all modules matching any of these conditions.",
"oneOf": [
2017-11-19 20:31:33 +08:00
{
2018-09-21 18:11:12 +08:00
"$ref": "#/definitions/Rules"
2017-11-19 20:31:33 +08:00
}
]
2017-11-19 18:45:15 +08:00
},
2018-09-21 17:54:35 +08:00
"raw": {
"description": "If true, banner will not be wrapped in a comment.",
2018-09-21 17:54:35 +08:00
"type": "boolean"
},
"test": {
"description": "Include all modules that pass test assertion.",
"oneOf": [
2017-11-19 20:31:33 +08:00
{
2018-09-21 18:11:12 +08:00
"$ref": "#/definitions/Rules"
2017-11-19 20:31:33 +08:00
}
]
2017-11-19 18:45:15 +08:00
}
2018-09-21 17:54:35 +08:00
},
"required": ["banner"]
2017-11-19 18:45:15 +08:00
},
{
2018-09-21 18:11:12 +08:00
"$ref": "#/definitions/BannerFunction"
2017-11-19 18:45:15 +08:00
}
]
2017-10-28 05:23:38 +08:00
}