This repository is a demo of Figmagic. In this project you're going to see how a project running Webpack, React and Styled Components might use tokens. There are pre-compiled tokens available under /tokens.
The example design token setup is available at https://www.figma.com/community/file/821094451476848226. That's the file providing the tokens seen here.
- Run
yarnornpm installinside of the repository to install all dependencies - Start the project by running
yarn startornpm start - To sync graphics, run
yarn figmagic:graphicsornpm run figmagic:graphics
- You will need to have a Figma file set up correctly (see above demo file)
- You will also need to have a Figma API key
- Set your URL and token in a file called
.envin the root of your project (such as in this one, if you want to get started right away) - Clone Figmagic, install it with
yarn setupornpm setup - Run the command
figmagicin your project directory - To run local Figmagic with arguments, it could be done like
npm run figmagic -- --debug -f emto set debug mode and grabbing fonts inemunits
Read more on the Figma developer site if you need any further information.