@design-sync/vanilla-extract-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

@design-sync/vanilla-extract-plugin

npm version npm downloads

Transforms design tokens to vanilla extract themes and styles

Usage

Install package:

# npm
npm install @design-sync/vanilla-extract-plugin

# yarn
yarn add @design-sync/vanilla-extract-plugin

# pnpm
pnpm install @design-sync/vanilla-extract-plugin

# bun
bun install @design-sync/vanilla-extract-plugin

in the config file add the plugin to the plugins array

import { vanillaExtractPlugin } from '@design-sync/vanilla-extract-plugin'

export default {
  plugins: [vanillaExtractPlugin({
    // relative path in the `out` root config, default ''
    outDir: 'vanilla-extract',
    // name of the exported variable from the theme contract, default: 'contract'
    contractName: 'contract',
    // global theme selector, default: ':root'
    globalThemeSelector: ':root',
    // create global themes, default: false
    createGlobalThemes: false,
    // create global theme contract, default: false
    createGlobalContract: false,
  })],
}

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @design-sync/vanilla-extract-plugin

Weekly Downloads

113

Version

0.7.0

License

MIT

Unpacked Size

22.2 kB

Total Files

9

Last publish

Collaborators

  • salamaashoush