|
@@ -2,22 +2,23 @@
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
"type": "object",
|
|
|
"required": ["resources"],
|
|
|
- "description": "Contains all resources (images, fonts, stylesheets, etc.) used by BYTM",
|
|
|
+ "description": "Contains all resources (images, fonts, stylesheets, etc.) used by BYTM.",
|
|
|
"properties": {
|
|
|
"alwaysExternalAssetPatterns": {
|
|
|
"type": "array",
|
|
|
- "description": "List of patterns passed to `new RegExp()` that should always be considered external assets (they won't be loaded via @resource)",
|
|
|
+ "description": "List of patterns passed to `new RegExp()` that should always be considered external assets (they won't be loaded via @resource).",
|
|
|
"items": {
|
|
|
"type": "string",
|
|
|
- "format": "regex"
|
|
|
+ "format": "regex",
|
|
|
+ "pattern": "^.+$"
|
|
|
}
|
|
|
},
|
|
|
"resources": {
|
|
|
"type": "object",
|
|
|
- "description": "Mapping of resource file identifiers and paths",
|
|
|
+ "description": "Mapping of resource file identifiers and paths.",
|
|
|
"patternProperties": {
|
|
|
"^[a-zA-Z]([a-zA-Z0-9_]+)?-[a-zA-Z0-9-_]+$": {
|
|
|
- "description": "Resource key in the format `prefix-resource_name`",
|
|
|
+ "description": "Resource with a key in the format `prefix-resource_name` and a value that is either a path string or metadata object.",
|
|
|
"oneOf": [
|
|
|
{
|
|
|
"type": "string"
|
|
@@ -28,16 +29,16 @@
|
|
|
"properties": {
|
|
|
"path": {
|
|
|
"type": "string",
|
|
|
- "description": "Path or URL to the resource. If it starts with /, it's relative to the project root, else it's relative to the assets folder. Query strings and hashes are allowed. You may make use of $MODE, $BRANCH, $HOST, $BUILD_NUMBER and $UID"
|
|
|
+ "description": "Path or URL to the resource. If it starts with /, it's relative to the project root, else it's relative to the assets folder. Query strings and hashes are allowed. You may make use of the placeholders $MODE, $BRANCH, $HOST, $BUILD_NUMBER and $UID anywhere in the string."
|
|
|
},
|
|
|
"ref": {
|
|
|
"type": "string",
|
|
|
- "description": "Branch, tag, or commit SHA to use when fetching the resource. You may make use of $MODE, $BRANCH, $HOST, $BUILD_NUMBER and $UID"
|
|
|
+ "description": "Git Ref (branch, tag, or commit SHA) to use when fetching the resource from the CDN. Uses the branch and build number from src/constants.ts if not set. You may make use of the placeholders $MODE, $BRANCH, $HOST, $BUILD_NUMBER and $UID anywhere in the string."
|
|
|
},
|
|
|
"integrity": {
|
|
|
"type": "boolean",
|
|
|
"default": true,
|
|
|
- "description": "Whether to calculate a Subresource Integrity hash for the resource (works with any URLs too)"
|
|
|
+ "description": "Whether to calculate a Subresource Integrity hash for the resource (works with URLs too)."
|
|
|
}
|
|
|
},
|
|
|
"additionalProperties": false
|