Skip to content
Alasdair Mercer edited this page Sep 25, 2017 · 14 revisions

TODO

Brander's ability to generate assets is built on a task-based system which can be configured in the .branderrc file. These all follow the same general schema within the configuration:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "input": {
      "type": "object",
      "properties": {
        "dir": { "type": "string" },
        "files": {
          "anyOf": [
            { "type": "string" },
            {
              "type": "array",
              "items": { "type": "string" }
            }
          ]
        },
        "format": { "type": "string" }
      },
      "required": [ "files" ]
    },
    "options": {
      "type": "object",
      "properties": {
        "groupBy": { "type": "string" },
        "sizes": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "string",
                "pattern": "^\\s*\\d+\\s*([xX]\\s*\\d+)?\\s*$"
              }
            ]
          }
        }
      }
    },
    "output": {
      "type": "object",
      "properties": {
        "dir": { "type": "string" },
        "files": { "type": "string" },
        "format": { "type": "string" }
      },
      "anyOf": [
        { "required": [ "files" ] },
        { "required": [ "format" ] }
      ]
    },
    "task": { "type": "string" }
  },
  "required": [
    "input",
    "task"
  ]
}

Tasks

TODO: Intro to tasks

Clean

TODO: Describe clean tasks

Convert

TODO: Describe convert tasks

Optimize

TODO: Describe convert tasks

Clone this wiki locally