0.0.1 • Published 10 months ago

@terrazzo/plugin-swift v0.0.1

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

⛋ @terrazzo/plugin-swift

Generate Swift code from DTCG tokens.

Setup

Requires Node.js 18 or later. With that installed, and a package.json, run:

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

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

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

export default defineConfig({
  outDir: "./tokens/",
  plugins: [
    swift({
      catalogName: "Tokens",
    }),
  ],
});

Lastly, run:

npx tz build

And you’ll see a ./tokens/Tokens.xcassets catalog generated in your project. Import it into your project and you’ll have access to all your tokens!

Full Documentation

0.0.1

10 months ago

0.0.0

12 months ago