0.6.0 • Published 5 months ago

@terrazzo/plugin-js v0.6.0

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

⛋ @terrazzo/plugin-js

Generate JavaScript, TypeScript, and JSON from DTCG tokens.

Setup

Requires Node.js 18 or later. With that installed, run:

npm i -D @terrazzo/cli @terrazzo/plugin-js

Add a terrazzo.config.js to the root of your project with:

import { defineConfig } from "@terrazzo/cli";
import js from "@terrazzo/plugin-js";

export default defineConfig({
  outDir: "./tokens/",
  plugins: [
    js({
      js: "index.js",
      // json: "tokens.json",
    }),
  ],
});

Lastly, run:

npx tz build

And you’ll see a ./tokens/index.js file generated in your project.

Full Documentation

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

7 months ago

0.1.1

7 months ago

0.1.0

8 months ago

0.0.3

10 months ago

0.0.2

11 months ago

0.0.1

11 months ago

0.0.0

1 year ago