#!/bin/bash
# Figma Plugin Publishing Helper Script
echo "๐จ MCP Figma Plugin Publishing Helper"
echo "======================================"
# Check if we're in the right directory
if [ ! -f "src/mcp_plugin/manifest.json" ]; then
echo "โ Error: manifest.json not found. Please run this script from the project root."
exit 1
fi
echo "โ Plugin files found"
# Check required files
echo ""
echo "๐ Checking required files:"
# Check manifest.json
if [ -f "src/mcp_plugin/manifest.json" ]; then
echo "โ manifest.json"
else
echo "โ manifest.json - MISSING"
fi
# Check code.js
if [ -f "src/mcp_plugin/code.js" ]; then
echo "โ code.js"
else
echo "โ code.js - MISSING"
fi
# Check ui.html
if [ -f "src/mcp_plugin/ui.html" ]; then
echo "โ ui.html"
else
echo "โ ui.html - MISSING"
fi
# Check icon
if [ -f "src/mcp_plugin/icon.svg" ] || [ -f "src/mcp_plugin/icon.png" ]; then
echo "โ icon file"
else
echo "โ icon file - MISSING (need icon.svg or icon.png)"
fi
echo ""
echo "๐ Plugin directory contents:"
ls -la src/mcp_plugin/
echo ""
echo "๐ฏ Next Steps for Publishing:"
echo ""
echo "1. ๐ธ Create Assets (if missing):"
echo " โข Plugin icon (128x128px): src/mcp_plugin/icon.png"
echo " โข Cover image (1920x960px): figma-assets/cover-image.png"
echo " โข Screenshots: figma-assets/screenshots/"
echo ""
echo "2. ๐งช Test Plugin Locally:"
echo " โข Open Figma Desktop"
echo " โข Go to Plugins โ Development โ Import plugin from manifest"
echo " โข Select: src/mcp_plugin/manifest.json"
echo " โข Test all functionality"
echo ""
echo "3. ๐ Publish to Figma Community:"
echo " โข Go to: https://www.figma.com/community/publish"
echo " โข Click 'Publish a plugin'"
echo " โข Upload manifest.json (Figma will bundle all files)"
echo " โข Fill in plugin details and upload assets"
echo " โข Submit for review"
echo ""
echo "4. ๐ Read Full Guide:"
echo " โข See: FIGMA_PUBLISHING_GUIDE.md for detailed instructions"
echo ""
# Check if we can zip the plugin files for easy sharing
echo "๐พ Creating plugin bundle for testing..."
cd src/mcp_plugin
if command -v zip >/dev/null 2>&1; then
zip -r ../../mcp-figma-plugin.zip . -x "*.DS_Store"
echo "โ Plugin bundle created: mcp-figma-plugin.zip"
cd ../..
echo " You can share this zip file for testing or submit manifest.json directly to Figma"
else
echo "โน๏ธ Zip not available. You can manually bundle the files in src/mcp_plugin/"
cd ../..
fi
echo ""
echo "๐ Plugin is ready for publishing!"
echo " Follow the steps above to submit to Figma Community."