1.0.10 ⢠Published 7 months ago
@onvy/frontend-design-tokens v1.0.10
A command line tool to automate the creation of theme files from Figma
Steps to create theme files:
ā Note that you need nodejs on you system to generate the files
- Go to Figma and open the
Design System/Design System Evolutionfile š - Install this Json Exporter figma plugin
- Click on
Pluginsthen Tap on theJson Exporterplugin and then tapExport Figma Datato have the file downloaded somewhere on your system - Run
npx @onvy/frontend-design-tokens <path-you-downloaded-file-to> <target-directory-to-have-generated files>, for example:npx @onvy/frontend-design-tokens ~/Downloads/data.json ~/Desktop/ONVY/mobile-app/src/styles/generated/. Alternatively, You can also run the ts files directly usingts-node, for example:npx ts-node src/index.ts ~/Downloads/data.json ~/Downloads/generated/
At this point, you should see the files generated in the specified directory.
ā If an error is shown in the console instead of generating the files, then there is likely some issues with the tokens. Check the output message and report back to UI/UX