Build Plugin with the following commands
$ npm install --legacy-peer-deps
$ npm run build
To watch for code changes and rebuild the plugin automatically:
$ npm run watch
Then install the plugin in Figma
- In the Figma desktop app, open a Figma document.
- Search for and run
Import plugin from manifest…
via the Quick Actions search bar. - Select the
manifest.json
file that was generated by thebuild
script.
Run Python script to generate react code with following commands:
- cd src/python
- source env/bin/activate
- python3 figmaBuddyV2.py
It will run a local server which listens to port 8989. Input to this server is the image of UI mock and output is the react code.