0.6.0 • Published 10 months ago

@terrazzo/plugin-js v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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

10 months ago

0.3.0

10 months ago

0.5.0

10 months ago

0.4.0

10 months ago

0.2.0

11 months ago

0.1.1

12 months ago

0.1.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago