{
  "title": "Project Configuration (version 1.0)",
  "description": "Defines the bundles and list of externals for this project",

  "type": "object",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string"
    },

    "entries": {
      "description": "An array of bundle definitions",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["entry", "manifest", "outputPath"],
        "properties": {
          "entry": {
            "description": "The path to JS file of the primary entry point for the bundle",
            "type": "string"
          },
          "manifest": {
            "description": "The path to the Client-side Component Manifest for this bundle (optional)",
            "type": ["string", "null"]
          },
          "outputPath": {
            "description": "The path where the compiled bundle should be written",
            "type": "string"
          }
        }
      }
    },

    "externals": {
      "description": "A mapping of external bundles to the path to the bundled JS, used to create bundle config",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z0-9\\.\\$_@/-]+$": {
          "oneOf": [
            {
              "type": "string",
              "description": "The path to the bundled external file"
            },
            {
              "type": "object",
              "additionalProperties": false,
              "required": ["path", "globalName"],
              "properties": {
                "path": {
                  "type": "string",
                  "description": "The path to the bundled external non-AMD file"
                },
                "globalName": {
                  "type": "string",
                  "description": "The name of the global variable where an non-AMD dependency drops its exports",
                  "minLength": 1
                },
                "globalDependencies": {
                  "description": "List of non-AMD dependencies for this project",
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          ]
        }
      }
    },

    "localizedResources": {
      "description": "A set of localized resources, to be discovered following a specific pattern",
      "type": "object",
      "patternProperties": {
        "^[a-zA-Z0-9\\.\\$_@/-]+$": {
          "type": "string",
          "description": "The path to the localized resource file, relative to the root of the lib directory"
        }
      },
      "additionalProperties": false
    }
  }
}
