1.0.2 • Published 2 years ago

figma-portal v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Simple way to export a Figma components by name:ok_hand:

figma-portal is your choice:

  • If you use and strictly adhere to the naming policy in component library
  • Explaining to the designer where to get the nodeId, teamId or fileKey is too difficult

Install

npm install figma-portal --save-dev

Usage

figma-portal extract -d DEFAULT_OUTPUT_DIR -p PROJECT_NAME -c .figma.yml

Environment variables

  • FIGMA_TOKEN - Personal or OAuth token
  • FIGMA_TEAM_ID - Id of the team to list projects from

Configuration

Create a config file - .figma.yml, and add a new description for the exported components:

# Unique name of the component within the project
- name: GitHub / Figma portal / Logo
  # Output directory if different from default
  outputDir: media
  # Output file name, if necessary (by default uses the name of the component)
  fileName: banner
  # A string enum for the image output format, can be jpg, png, svg, or pdf
  format: svg
  # A number between 0.01 and 4, the image scaling factor
  scale: 1

API

Read the API documentation for more information.

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.11.0

2 years ago

0.10.2

2 years ago

0.10.1

2 years ago

0.10.0

2 years ago

0.9.5

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago