1.0.18 • Published 7 months ago

figma-export-js v1.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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:

npm install -g figma-export-js

or if you are using yarn:

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:

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:

figma:
  fieldId: your-figma-file-id
common:
  icons: "^(ic)/([a-z0-9_]+)$"
  images: "^(img)/([a-z0-9_]+)$"
  variablesType: "scss" # scss or css. If css is selected, the file will be generated with css var variables
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
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:

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 license.

1.0.18

7 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.0.15

9 months ago

1.0.14

9 months ago

1.0.13

9 months ago

1.0.12

10 months ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago