Create a .env
file with you figma access token and the key for the file you would like to access.
env
DEV_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
FILE_KEY="xxxxxxxxxxxxxxxxxxxxxxxx"
git clone https://github.com/atto-byte/figma-api-demo.git
cd figma-api-demo
npm install
npm run gen
Edit src\index.tsx
then run npm run start
to Display the Generated Components
git clone https://github.com/atto-byte/figma-api-demo.git
cd figma-api-demo
yarn
yarn gen
Edit src\index.tsx
then run yarn start
to Display the Generated Components
Press F5 and Select Generate, you can then set breakpoints in figma/*
to debug the generation