Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/davidpett/figma-theme-gen


https://github.com/davidpett/figma-theme-gen

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# figma-theme-gen

![Build and Publish](https://github.com/davidpett/figma-theme/workflows/Build%20and%20Publish/badge.svg)

This package will parse your figma file's local styles and create a theme for you to consume in your project.

## install

```
yarn add -D figma-theme-gen
```

## configure

By default, this looks for a `figma.json` file in the root of your project, you can use a different file name by specifying `--config foo.json`

In this config file, there are a few required options:

```
{
"outputFile": "",
"fileId": "",
"accessToken": ""
}
```

You can also configure the spacing options by adding

```
{
"spacing": {
"baseUnit": 10, // by default this is 8, this will change all unspecified spacing to multiples of 10
"padding": {
"xs": 6,
"s": 12,
"m": 18,
"l": 24,
"xl": 30
},
"margin": {},
"borderRadius": {}
}
}
```