@primer/primitives
Version:
Typography, spacing, and color primitives for Primer design system
32 lines (31 loc) • 783 B
JavaScript
import { isSource } from '../filters/index.js';
export const json = (outputFile, prefix, buildPath, options) => ({
prefix,
buildPath,
preprocessors: ['themeOverrides'],
transforms: [
'color/hex',
'dimension/rem',
'shadow/css',
'border/css',
'typography/css',
'fontFamily/css',
'fontWeight/number',
],
options: {
basePxFontSize: 16,
themeOverrides: {
theme: options === null || options === void 0 ? void 0 : options.theme,
},
},
files: [
{
destination: outputFile,
filter: isSource,
format: `json/nested-prefixed`,
options: {
outputReferences: false,
},
},
],
});