1.0.6 • Published 2 years ago

figma-react-icons-generator v1.0.6

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

figma-react-icons-generator

Install

$ npm install --save-dev figma-react-icons-generator

OR

$ yarn add --dev figma-react-icons-generator

Prerequisites

You will need to have a figma access token, you can get it from here.

How to use

  • Create a figma file with icons like this file.

  • Open the project in a browser to get file id.

For example, for a url like this,

https://www.figma.com/file/UdgrZIihTO3DoiYFYcCg6R/xxx

The file id is UdgrZIihTO3DoiYFYcCg6R.

  • Add in your package.json icons script with figma-react-icons-generator -t <FIGMA_TOKEN> -f <FIGMA_FILE> -c <FIGMA_CANVA> -o <OUTPUT_FOLDER>
  "scripts": {
    "icons": "figma-react-icons-generator -t <FIGMA_TOKEN> -f <FIGMA_FILE> -c <FIGMA_CANVA> -o <OUTPUT_FOLDER>",
  },
  • Then you only have to run this command
$ npm run icons

OR

$ yarn icons