@primer/primitives
Version:
Typography, spacing, and color primitives for Primer design system
34 lines (33 loc) • 864 B
JavaScript
import { isSource } from '../filters/index.js';
export const styleLint = (outputFile, prefix, buildPath, options) => ({
prefix,
buildPath,
preprocessors: ['themeOverrides'],
transforms: [
'name/pathToKebabCase',
'color/hex',
'dimension/remPxArray',
'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,
format: `json/one-dimensional`,
filter: isSource,
options: {
outputReferences: false,
outputVerbose: true,
},
},
],
});