Socket
Book a DemoInstallSign in
Socket

figma-tokens-converter-cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figma-tokens-converter-cli

A CLI with utilities to simplify the process of Figma Design Tokens to Frontend.

1.3.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

figma-tokens-converter-cli

A CLI with utilities to simplify the process of Figma Design Tokens to Frontend.

First Steps

Installation

In order to install it on your system simply run

yarn add figma-tokens-converter-cli

Example

For convinience i made an example that you can see here The example is how the cli can work on a project.

Help

By running the command as a cli on your terminal you can see the options and arguments needed You can define help for each utility as well

$ figma-tokens-converter-cli --help
$ figma-tokens-converter-cli parseFigmaTokens --help
$ figma-tokens-converter-cli parseJsonToCode --help

Utilities

parseFigmaTokens

This utility grabs all the properties from your .json file and export them to the output path specified. There are options to further expand some properties to from one file to several or specify only some properties.

Properties

nametypeoptiondescription
inputstringThe input of the .json figma file
outputstringOutput directory to write the converted results
pickstring-p, --pickSpecify in comma separated format the properties to pick - Optional
expandstring-e, --expandSpecify in comma separated format the properties to expand in more files
outputExtensionstring-oe, --outputExtensionThe output file extension that must be transformed to. Defaults to json (default: "json")

parseJsonToCode

This utility parse a directory of json files and converts them to code. By default it transforms them to TS files but you can also specify JS files.

Properties

nametypeoptiondescription
inputstringThe input directory
outputstringOutput directory to write the converted results
outputExtensionstring-oe, --outputExtensionThe output file extension that must be transformed to. Defaults to json (default: "json")

Keywords

figma tokens

FAQs

Package last updated on 01 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.