# figma-theme-gen

> generate theme from figma file

Latest version **1.0.9** (published 2020-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install figma-theme-gen
pnpm add figma-theme-gen
yarn add figma-theme-gen
bun add figma-theme-gen
```

Provides the command `figma-theme-gen`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2020-02-18 |
| First published | 2020-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | David Pett |
| Maintainers | davidpett |

## Links

- npm: https://www.npmjs.com/package/figma-theme-gen
- Repository: https://github.com/davidpett/figma-theme-gen
- npm.io page: https://npm.io/package/figma-theme-gen

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^3.0.0
- [yargs](https://npm.io/package/yargs.md) ^15.1.0
- [figma-js](https://npm.io/package/figma-js.md) ^1.9.0
- [figma-transformer](https://npm.io/package/figma-transformer.md) ^1.0.0

## Recent versions

- 1.0.9 (latest) — 2020-02-18
- 1.0.8 — 2020-02-18
- 1.0.7 — 2020-02-18
- 1.0.6 — 2020-02-17
- 1.0.5 — 2020-02-17
- 1.0.4 — 2020-02-17
- 1.0.3 — 2020-02-17
- 1.0.2 — 2020-02-17
- 1.0.1 — 2020-02-17
- 1.0.0 — 2020-02-17

## 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": "<path-to-output-theme-file>",
  "fileId": "<your-figma-file-id>",
  "accessToken": "<your-figma-access-token>"
}
```

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": {}
  }
}
```

---
_Source: https://npm.io/package/figma-theme-gen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
