JSPM

  • Created
  • Published
  • Downloads 1206
  • Score
    100M100P100Q106447F
  • License MIT

CLI for using the W3C design token format

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cobalt-ui/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Cobalt UI

    Schemas and tools for managing design tokens.

    Usage

    Install:

    npm i -D @cobalt-ui/cli

    And place a tokens.config.mjs file in the root of your project. Here are all the options, along with defaults:

    // tokens.config.mjs
    
    /** @type import('@cobalt-ui/core').Config */
    export default {
      /** path to tokens.json */
      tokens: './tokens.json',
      /** output directory for generated code*/
      outDir: './tokens/',
      /** plugins to generate different outputs */
      plugins: [],
    };

    Commands

    Command Description
    co build Generate code from tokens.json
    co build --watch Watch tokens.json for changes and rebuild on every save
    co sync Sync tokens.json with Figma
    co init Create a stub tokens.json file
    co check Check tokens.json for errors

    Plugins

    Plugins are the entire purpose of using Cobalt! See the plugin documentation for instructions on getting started.

    Figma

    For instructions on setting up figma, see the Figma documentation

    Documentation

    See Documentation