Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidpett/figma-theme-gen
https://github.com/davidpett/figma-theme-gen
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/davidpett/figma-theme-gen
- Owner: davidpett
- License: mit
- Created: 2020-02-10T20:41:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-18T23:49:29.000Z (almost 5 years ago)
- Last Synced: 2024-10-24T18:51:53.620Z (2 months ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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": {}
}
}
```