- Create a
run-plugin.sh
somewhere in your project - Copy the code from the
run-plugin.sh
file in this gist - Install nodemon with
yarn add --dev nodemon
- Add a script in the
scripts
property of yourpackage.json
replacingPLUGIN_CODE_FOLDER
by the path to the folder where your plugin code lives"scripts": { "livereload": "nodemon --watch PLUGIN_CODE_FOLDER --exec run-plugin.sh" }
- Run your livereload task with
yarn livereload
-
-
Save Khachatour/b1a60b23fa819d48f47e13d84649858d to your computer and use it in GitHub Desktop.
Figma Plugin Development Live Reload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
osascript <<'EOF' | |
if application "Figma" is running then | |
tell application "Figma" to activate | |
tell application "System Events" to tell process "Figma" | |
keystroke "p" using {command down, option down} | |
end tell | |
return "Running" | |
else | |
return "Not running" | |
end if | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment