{
  "title": "Typescript Build Target",
  "description": "Builds using TypeScript",
  "cli": "nx",
  "type": "object",
  "properties": {
    "main": {
      "type": "string",
      "description": "The name of the main entry-point file."
    },
    "outputPath": {
      "type": "string",
      "description": "The output path of the generated files."
    },
    "tsConfig": {
      "type": "string",
      "description": "The path to the Typescript configuration file."
    },
    "assets": {
      "type": "array",
      "description": "List of static assets.",
      "default": [],
      "items": {
        "$ref": "#/definitions/assetPattern"
      }
    }
  },
  "required": ["main", "outputPath", "tsConfig"],

  "definitions": {
    "assetPattern": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "glob": {
              "type": "string",
              "description": "The pattern to match."
            },
            "input": {
              "type": "string",
              "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
            },
            "ignore": {
              "description": "An array of globs to ignore.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "output": {
              "type": "string",
              "description": "Absolute path within the output."
            }
          },
          "additionalProperties": false,
          "required": ["glob", "input", "output"]
        },
        {
          "type": "string"
        }
      ]
    }
  }
}
