1.7.0 • Published 6 months ago

@ch-ui/vite-plugin-tokens v1.7.0

Weekly downloads
-
License
Ch Public License
Repository
-
Last release
6 months ago

@ch-ui/vite-plugin-tokens

A Vite plugin which uses @ch-ui/tokens to configure & build a set of CSS tokens.

Getting started

Add to your app’s dev dependencies.

pnpm add -D @ch-ui/vite-plugin-tokens

Then add to your app’s Vite config.

import chTokensPlugin, { defaultTokenSet } from '@ch-ui/vite-plugin-tokens';
// ...
  plugins: [
    // ...
    chTokensPlugin({
      config: (tokenSetName: string) => {
        switch(tokenSetName){
          case 'my-tokens':
          default:
            return defaultTokenSet;
        }
      },
    })
  ]

Then use the @tokens at-rule to invoke the plugin.

@layer tokens {
  @tokens my-token-set;
}
1.2.0

9 months ago

1.1.0

9 months ago

1.0.0

10 months ago

1.0.0-rc.5

10 months ago

1.0.0-rc.6

10 months ago

1.7.0

6 months ago

1.4.3

6 months ago

1.6.0

6 months ago

1.3.3

8 months ago

1.5.0

6 months ago

1.3.2

8 months ago

1.3.1

8 months ago

1.3.0

9 months ago

1.0.0-rc.3

10 months ago

1.0.0-rc.4

10 months ago

1.0.0-rc.1

10 months ago

1.0.0-rc.2

10 months ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago