@design-sync/w3c-dtfm
TypeScript icon, indicating that this package has built-in type declarations

0.11.2 • Public • Published

@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.

Readme

Keywords

none

Package Sidebar

Install

npm i @design-sync/w3c-dtfm

Weekly Downloads

91

Version

0.11.2

License

MIT

Unpacked Size

178 kB

Total Files

8

Last publish

Collaborators

  • salamaashoush