0.11.0 • Published 5 months ago

@design-sync/w3c-dtfm v0.11.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@design-sync/w3c-dtfm

npm version npm downloads

Design tokens module format (DTFM) utils and types

Usage

Install package:

# npm
npm install @design-sync/w3c-dtfm

# yarn
yarn add @design-sync/w3c-dtfm

# pnpm
pnpm install @design-sync/w3c-dtfm

# bun
bun install @design-sync/w3c-dtfm

Import:

import { TokensWalker } from "@design-sync/w3c-dtfm";

const tokens = {
  "color": {
    "primary": {
      "$value": "#000000",
      "$type": "color"
    }
  }
  ... // rest of tokens
};
const walker = new TokensWalker(tokens);

walker.walk((token) => {
  // do something with token
  console.log(token);
});

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.

0.10.0

5 months ago

0.11.0

5 months ago

0.9.1

5 months ago

0.9.0

5 months ago

0.8.0

5 months ago

0.7.0

5 months ago

0.6.0

5 months ago

0.3.0

5 months ago

0.5.0

5 months ago

0.4.0

5 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.0

6 months ago

0.0.0

6 months ago