@design-sync/css-plugin
Transforms design tokens to css variables and classes
Usage
Install package:
npm install @design-sync/css-plugin
yarn add @design-sync/css-plugin
pnpm install @design-sync/css-plugin
bun install @design-sync/css-plugin
in the config file add the plugin to the plugins array
import { cssPlugin } from '@design-sync/css-plugin'
export default {
plugins: [cssPlugin({
extractAsStyles: ['typography'],
outDir: 'css',
typographyAsFontProperty: false,
selectors: {
dark: '@media (prefers-color-scheme: dark)',
light: '@media (prefers-color-scheme: light)',
},
})],
}
Development
- Clone this repository
- Install latest LTS version of Node.js
- Enable Corepack using
corepack enable
- Install dependencies using
pnpm install
- Run interactive tests using
pnpm dev
License
Made with 💛
Published under MIT License.