UNPKG

@maggioli-design-system/design-tokens

Version:

This is the Design Token library of Maggioli Design System, here you'll find all the visual data used around the libraries.

54 lines (53 loc) 1.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBrandColorConfig = getBrandColorConfig; function getBrandColorConfig(fileName, inputTokens, outputDir) { const buildPath = outputDir ?? 'dist'; let source, tokens; if (typeof inputTokens === 'object') { tokens = inputTokens; } else { source = tokens; } return { source, tokens, platforms: { css: { transformGroup: 'css', buildPath: `${buildPath}/css/`, files: [ { format: 'css/vars', destination: `colors-hex-${fileName}.css`, }, { format: 'css/vars-rgb-channels', destination: `colors-rgb-${fileName}.css`, }, ], }, dart: { transformGroup: 'js', buildPath: `${buildPath}/flutter/`, files: [ { destination: `colors-${fileName}.dart`, format: 'flutter/color', }, ], }, tailwind: { transformGroup: 'js', buildPath: `${buildPath}/tailwind/`, files: [ { destination: `colors-${fileName}.js`, format: 'js/tailwind-colors', }, ], }, }, }; }