|
| 1 | +# Contributing to ECS Editor Plugins |
| 2 | + |
| 3 | +Thank you for your interest in contributing to the ECS Editor Plugins marketplace! This document provides guidelines for submitting your plugin. |
| 4 | + |
| 5 | +## 📋 Prerequisites |
| 6 | + |
| 7 | +Before submitting your plugin, ensure: |
| 8 | + |
| 9 | +1. ✅ Your plugin is in a **public GitHub repository** |
| 10 | +2. ✅ Plugin implements the `IEditorModule` interface |
| 11 | +3. ✅ Includes a `manifest.json` file with all required fields |
| 12 | +4. ✅ Has a clear README with usage instructions |
| 13 | +5. ✅ Is licensed under an open source license (MIT, Apache 2.0, GPL, etc.) |
| 14 | +6. ✅ Has been tested with the latest ECS Editor version |
| 15 | + |
| 16 | +## 🚀 Submission Process |
| 17 | + |
| 18 | +### Step 1: Develop Your Plugin |
| 19 | + |
| 20 | +Use our [Plugin Template](PLUGIN_TEMPLATE/) as a starting point: |
| 21 | + |
| 22 | +```bash |
| 23 | +# Clone or download the template |
| 24 | +cp -r PLUGIN_TEMPLATE my-awesome-plugin |
| 25 | +cd my-awesome-plugin |
| 26 | + |
| 27 | +# Install dependencies |
| 28 | +npm install |
| 29 | + |
| 30 | +# Start development |
| 31 | +npm run dev |
| 32 | +``` |
| 33 | + |
| 34 | +See the [Plugin Development Guide](docs/PLUGIN_DEVELOPMENT.md) for detailed instructions. |
| 35 | + |
| 36 | +### Step 2: Build and Test |
| 37 | + |
| 38 | +```bash |
| 39 | +# Build your plugin |
| 40 | +npm run build |
| 41 | + |
| 42 | +# Test in ECS Editor |
| 43 | +# Copy dist/ to <project>/plugins/my-plugin/ |
| 44 | +``` |
| 45 | + |
| 46 | +Make sure your plugin: |
| 47 | +- Loads without errors |
| 48 | +- Doesn't conflict with other plugins |
| 49 | +- Follows ECS Editor best practices |
| 50 | +- Has good performance |
| 51 | + |
| 52 | +### Step 3: Publish to GitHub |
| 53 | + |
| 54 | +```bash |
| 55 | +# Commit your code |
| 56 | +git add . |
| 57 | +git commit -m "Initial release" |
| 58 | + |
| 59 | +# Tag your version |
| 60 | +git tag v1.0.0 |
| 61 | +git push origin main --tags |
| 62 | + |
| 63 | +# Create a GitHub Release (optional but recommended) |
| 64 | +gh release create v1.0.0 --notes "Initial release" |
| 65 | +``` |
| 66 | + |
| 67 | +### Step 4: Create Metadata File |
| 68 | + |
| 69 | +Fork this repository and create a JSON file in `plugins/community/`: |
| 70 | + |
| 71 | +```bash |
| 72 | +# Fork the repository |
| 73 | +gh repo fork esengine/ecs-editor-plugins |
| 74 | + |
| 75 | +# Clone your fork |
| 76 | +git clone https://github.com/YOUR_USERNAME/ecs-editor-plugins.git |
| 77 | +cd ecs-editor-plugins |
| 78 | + |
| 79 | +# Create your plugin metadata |
| 80 | +nano plugins/community/my-awesome-plugin.json |
| 81 | +``` |
| 82 | + |
| 83 | +Use this template for your JSON file: |
| 84 | + |
| 85 | +```json |
| 86 | +{ |
| 87 | + "id": "my-awesome-plugin", |
| 88 | + "name": "My Awesome Plugin", |
| 89 | + "version": "1.0.0", |
| 90 | + "author": { |
| 91 | + "name": "Your Name", |
| 92 | + "github": "yourusername", |
| 93 | + |
| 94 | + }, |
| 95 | + "description": "A detailed description of what your plugin does (min 10 chars, max 500)", |
| 96 | + "category": "Tool", |
| 97 | + "tags": ["utility", "helper", "tool"], |
| 98 | + "icon": "Package", |
| 99 | + "repository": { |
| 100 | + "type": "github", |
| 101 | + "url": "https://github.com/yourusername/my-awesome-plugin" |
| 102 | + }, |
| 103 | + "distribution": { |
| 104 | + "type": "cdn", |
| 105 | + "url": "https://cdn.jsdelivr.net/gh/yourusername/[email protected]/dist/index.js", |
| 106 | + "css": "https://cdn.jsdelivr.net/gh/yourusername/[email protected]/dist/style.css" |
| 107 | + }, |
| 108 | + "requirements": { |
| 109 | + "ecs-version": ">=2.0.0", |
| 110 | + "editor-version": ">=1.0.0" |
| 111 | + }, |
| 112 | + "license": "MIT", |
| 113 | + "homepage": "https://github.com/yourusername/my-awesome-plugin", |
| 114 | + "screenshots": [ |
| 115 | + "https://raw.githubusercontent.com/yourusername/my-awesome-plugin/main/screenshots/1.png" |
| 116 | + ] |
| 117 | +} |
| 118 | +``` |
| 119 | + |
| 120 | +### Step 5: Submit Pull Request |
| 121 | + |
| 122 | +```bash |
| 123 | +# Add your metadata file |
| 124 | +git add plugins/community/my-awesome-plugin.json |
| 125 | +git commit -m "Add my-awesome-plugin to marketplace" |
| 126 | +git push origin main |
| 127 | + |
| 128 | +# Create Pull Request |
| 129 | +gh pr create \ |
| 130 | + --title "Add my-awesome-plugin to marketplace" \ |
| 131 | + --body "Submitting my plugin for review" |
| 132 | +``` |
| 133 | + |
| 134 | +## 🔍 Review Process |
| 135 | + |
| 136 | +Once you submit your PR: |
| 137 | + |
| 138 | +1. **Automated Checks** (~2 minutes) |
| 139 | + - JSON validation |
| 140 | + - Repository accessibility check |
| 141 | + - Distribution URL verification |
| 142 | + - Basic security scan |
| 143 | + |
| 144 | +2. **Manual Review** (1-7 days) |
| 145 | + - Code quality review |
| 146 | + - Security audit |
| 147 | + - Functionality testing |
| 148 | + - Documentation review |
| 149 | + |
| 150 | +3. **Approval** |
| 151 | + - If approved, your PR will be merged |
| 152 | + - Your plugin appears in the marketplace within minutes |
| 153 | + - Users can install it immediately |
| 154 | + |
| 155 | +## 🔐 Security Guidelines |
| 156 | + |
| 157 | +Your plugin **MUST NOT**: |
| 158 | +- ❌ Use `eval()` or `Function()` constructor |
| 159 | +- ❌ Access file system directly (use provided APIs) |
| 160 | +- ❌ Execute arbitrary shell commands |
| 161 | +- ❌ Make network requests to untrusted sources |
| 162 | +- ❌ Collect user data without consent |
| 163 | +- ❌ Contain obfuscated code |
| 164 | + |
| 165 | +Your plugin **SHOULD**: |
| 166 | +- ✅ Use TypeScript for better type safety |
| 167 | +- ✅ Handle errors gracefully |
| 168 | +- ✅ Follow React best practices (if using UI) |
| 169 | +- ✅ Minimize dependencies |
| 170 | +- ✅ Document all public APIs |
| 171 | + |
| 172 | +## 📝 Metadata Requirements |
| 173 | + |
| 174 | +### Required Fields |
| 175 | + |
| 176 | +| Field | Type | Description | |
| 177 | +|-------|------|-------------| |
| 178 | +| `id` | string | Unique identifier (lowercase, hyphen-separated) | |
| 179 | +| `name` | string | Display name (1-100 chars) | |
| 180 | +| `version` | string | Semantic version (e.g., "1.0.0") | |
| 181 | +| `author` | object | Author information | |
| 182 | +| `author.name` | string | Your name | |
| 183 | +| `author.github` | string | GitHub username | |
| 184 | +| `description` | string | Plugin description (10-500 chars) | |
| 185 | +| `category` | enum | One of: Tool, Window, Inspector, System, ImportExport | |
| 186 | +| `repository.url` | string | GitHub repository URL | |
| 187 | +| `distribution.type` | enum | "cdn" or "npm" | |
| 188 | +| `distribution.url` | string | HTTPS URL to main file | |
| 189 | +| `requirements.ecs-version` | string | Required ECS version | |
| 190 | +| `license` | string | License identifier (e.g., "MIT") | |
| 191 | + |
| 192 | +### Optional Fields |
| 193 | + |
| 194 | +| Field | Type | Description | |
| 195 | +|-------|------|-------------| |
| 196 | +| `author.email` | string | Contact email | |
| 197 | +| `tags` | array | Keywords for search | |
| 198 | +| `icon` | string | Lucide icon name | |
| 199 | +| `distribution.css` | string | CSS file URL | |
| 200 | +| `requirements.editor-version` | string | Required editor version | |
| 201 | +| `homepage` | string | Plugin homepage | |
| 202 | +| `screenshots` | array | Screenshot URLs | |
| 203 | + |
| 204 | +## 🎨 Categories |
| 205 | + |
| 206 | +Choose the most appropriate category: |
| 207 | + |
| 208 | +- **Tool**: Utility tools and helpers |
| 209 | +- **Window**: New editor windows/panels |
| 210 | +- **Inspector**: Custom property inspectors |
| 211 | +- **System**: System-level plugins |
| 212 | +- **ImportExport**: Import/export functionality |
| 213 | + |
| 214 | +## 🏷️ Recommended Tags |
| 215 | + |
| 216 | +Use relevant tags to help users find your plugin: |
| 217 | + |
| 218 | +- `visual-editor`, `utility`, `tool`, `helper` |
| 219 | +- `ai`, `pathfinding`, `physics`, `animation` |
| 220 | +- `import`, `export`, `converter` |
| 221 | +- `debugging`, `profiling`, `testing` |
| 222 | + |
| 223 | +## 📊 Plugin Updates |
| 224 | + |
| 225 | +To update your plugin: |
| 226 | + |
| 227 | +1. Update version in your repository |
| 228 | +2. Create new git tag (e.g., `v1.1.0`) |
| 229 | +3. Update the JSON file in this repository |
| 230 | +4. Submit a new PR |
| 231 | + |
| 232 | +## ❓ Questions? |
| 233 | + |
| 234 | +- 📖 Read the [Plugin Development Guide](docs/PLUGIN_DEVELOPMENT.md) |
| 235 | +- 💬 Ask in [Discussions](https://github.com/esengine/ecs-editor-plugins/discussions) |
| 236 | +- 🐛 Report issues in [Issues](https://github.com/esengine/ecs-editor-plugins/issues) |
| 237 | + |
| 238 | +## 📜 Code of Conduct |
| 239 | + |
| 240 | +Please be respectful and professional in all interactions. We follow the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct. |
| 241 | + |
| 242 | +## 📄 License |
| 243 | + |
| 244 | +By submitting a plugin, you agree that: |
| 245 | +- Your plugin is open source |
| 246 | +- Your plugin metadata can be distributed under MIT license |
| 247 | +- You have the rights to submit the plugin |
| 248 | + |
| 249 | +--- |
| 250 | + |
| 251 | +Thank you for contributing to the ECS Editor ecosystem! 🎉 |
0 commit comments