Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/urlaunched-com/figma-export-js
Figma Export is a library that allows you to export resources from Figma into your project.
https://github.com/urlaunched-com/figma-export-js
export figma figma-export figma-js figma-svg
Last synced: about 16 hours ago
JSON representation
Figma Export is a library that allows you to export resources from Figma into your project.
- Host: GitHub
- URL: https://github.com/urlaunched-com/figma-export-js
- Owner: urlaunched-com
- License: mit
- Created: 2024-04-20T10:18:31.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-23T19:03:19.000Z (7 months ago)
- Last Synced: 2024-04-23T22:25:43.637Z (7 months ago)
- Topics: export, figma, figma-export, figma-js, figma-svg
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/figma-export-js
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Figma Export
Figma Export is a library that allows you to export resources from Figma into your project. It automatically generates
a `figma-export.yaml` file that contains settings for exporting resources.## Installation
To install the library, run the following command:
```bash
npm install -g figma-export-js
```or if you are using yarn:
```bash
yarn global add figma-export-js
```### Initialization
To start working with the library, you need to initialize a configuration file. To do this, run the command:
```bash
figma-export init
```This command will create a `figma-export.yaml` file with basic settings.
### Configuration
In the `figma-export.yaml` file, you can specify the following settings:
```yaml
figma:
fieldId: your-figma-file-id
common:
icons: "^(ic)/([a-z0-9_]+)$"
images: "^(img)/([a-z0-9_]+)$"
path:
styles: "./src/core/styles/_global"
icons: "./public/assets/icons"
images: "./public/assets/images"
```Please replace your-figma-file-id with your actual Figma file ID.
## Environment Variables
In addition to the settings in the figma-export.yaml file, you also need to set up an environment variable before
running your application. The required environment variable is:- `FIGMA_PERSONAL_TOKEN`: Your Figma personal token
```bash
export FIGMA_PERSONAL_TOKEN=your-figma-personal-token
```Please replace your-figma-personal-token with your actual Figma personal token.
### Exporting Resources
After setting up the configuration file, you can start exporting resources. To do this, simply run the `figma-export`
command without arguments:```bash
figma-export
```This command will export all resources specified in the figma-export.yaml file to the corresponding directories.
## License
Figma Export is distributed under the [MIT](https://opensource.org/licenses/MIT) license.