Common style-dictionary classes and functions
npm install @breadstone-infrastructure/style-dictionary| Package Status | Source |
|----------------|--------|
|  | infra/style-dictionary-plugins |
> Style Dictionary Plugins for Breadstone projects.
> Reusable transforms and preprocessors for Style Dictionary to support advanced design token workflows.
---
Part of the monorepo mosaik
Package path: infra/style-dictionary-plugins
Version: see npm
License: MIT
---
``bash`
yarn add @breadstone-infrastructure/style-dictionaryor
npm install @breadstone-infrastructure/style-dictionary
---
In your Style Dictionary config:
`js
const {
shadowCssTransform,
gradientTransform,
nameSnakeUpperCaseTransform,
quoteStringTransform,
listTransform,
letterSpacingTransform,
expandShadowPreprocessor,
lintPreprocessor
} = require('@breadstone-infrastructure/style-dictionary');
// Register transforms
StyleDictionary.registerTransform(shadowCssTransform);
StyleDictionary.registerTransform(gradientTransform);
StyleDictionary.registerTransform(nameSnakeUpperCaseTransform);
StyleDictionary.registerTransform(quoteStringTransform);
StyleDictionary.registerTransform(listTransform);
StyleDictionary.registerTransform(letterSpacingTransform);
// Register preprocessors
StyleDictionary.registerPreprocessor(expandShadowPreprocessor);
StyleDictionary.registerPreprocessor(lintPreprocessor);
`
---
- Custom transforms: shadow, gradient, list, letter spacing, name transforms
- Preprocessors: lint and expand tokens before transformation
- TypeScript-first: fully typed
- Nx Workspace: part of a monorepo for scalable development
---
- Use with Style Dictionary for design token management.
- Integrate into your Nx workspace for design system automation.
---
`bash`
yarn nx run style-dictionary-plugins:publish
---
MIT © Breadstone
---
---
This package is part of the Breadstone Nx monorepo.
Use Nx for building and testing:
`sh``
npx nx run style-dictionary-plugins:build
---
MIT © Breadstone
---