this is a tool aiming to help developers to download and keep updated figma templates as react components
- Get an access token on figma and store it in
FIGMA_TOKEN
env variable
export FIGMA_TOKEN=<YOUR_TOKEN>
- create a file
figma.json
with the following structure :
{
"ref":{
"figma_id": "",
"output": ""
}
}
ref
will be a reference to update this componentfigma_id
is your figma project id (you can find it in the project url www.figma.com/file/{id})output
is a javascript file the component will be written
- run
npx pull-from-figma
with eventually--ref=ref
to generate the files
usage : pull-from-figma [--file=figma.json] [--ref=.*]