Skip to content

CLI config properties for output #4567

@mimarz

Description

@mimarz

We need to make room for defining build options/properties in our config for tokens build.

As of writing this would be primarily outDir and clean.

We also need to take into account future features such as output build as css and/or json.

Maybe we can take some inspiration from the bundlers/transpilers out there; rolldown, rollup, postcss etc.

Potential schema:

{
  "$schema": "packages/cli/dist/config.schema.json",
  "outDir": "design-tokens", // deprecated, use output instead
  "output": [
    {
      "action": "create",
      "dir": "design-tokens",
      "cleanDir": true
    },
    {
      "action": "build-css",
      "dir": "design-tokens-build",
      "banner": "my banner",
      "cleanDir": true
    }
  ],
  "clean": true,
  "themes": {
    "designsystemet": {
      "colors": {
        "main": {
          "accent": "#0062BA"
        },
        "support": {
          "brand1": "#0D7A5F",
          "brand2": "#5B3FA0"
        },
        "neutral": "#24272B"
      },
      "borderRadius": 4,
      "typography": {
        "fontFamily": "Inter"
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🗄️ Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions