Skip to main content

phaser-editor-plugin

Build and extend third-party plugins for Phaser Editor v5 in this template. Use when adding or modifying a plugin feature — a command, custom editor, content type, New File wizard entry, Inspector property section, Outline provider, view, theme, or plugin styles — or when working with plugin.json, the colibri API, the bundled types/*.d.ts, or registerExtensions. Read the docs/ recipes before writing code.

소스 정보

저장소
phaserjs/phaser-editor-5-plugin-template
최근 소스 활동
2026년 6월 11일 13:50
감지된 SKILL.md 언어
영어
스타
5
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
phaser-editor-plugin
description
Build and extend third-party plugins for Phaser Editor v5 in this template. Use when adding or modifying a plugin feature — a command, custom editor, content type, New File wizard entry, Inspector property section, Outline provider, view, theme, or plugin styles — or when working with plugin.json, the colibri API, the bundled types/*.d.ts, or registerExtensions. Read the docs/ recipes before writing code.
# Phaser Editor v5 plugin development This repository is a template for third-party Phaser Editor v5 plugins. Use this skill whenever you add or change plugin functionality. ## First: read the right doc The repo's `docs/` folder is the source of truth for patterns. **Read the relevant doc before writing code** — don't rely on memory for the colibri API. 1. Orientation: [`AGENTS.md`](../../../AGENTS.md) and [`docs/architecture.md`](../../../docs/architecture.md). 2. Pick the extension point: [`docs/extension-points.md`](../../../docs/extension-points.md). 3. Read the matching recipe in `docs/recipes/`: - [add a command](../../../docs/recipes/add-a-command.md) - [add a custom editor](../../../docs/recipes/add-a-custom-editor.md) - [add a content type & New File wizard](../../../docs/recipes/add-a-content-type-and-new-file.md) - [add Inspector properties](../../../docs/recipes/add-inspector-properties.md) - [add styles (theme-correct)](../../../docs/recipes/add-styles.md) ## Non-negotiables - Everything is registered in `registerExtensions(reg)` via `reg.addExtension(new SomeExtension(...))`. Edit `myplugin.example/src/ExamplePlugin.ts`. - One plugin = **one TypeScript namespace**. No `import`/`export` between plugin files; no bundler; no runtime npm. - The editor API lives only in `types/colibri.d.ts` and `types/phasereditor2d.files.d.ts`. **Grep them to confirm any API** — if it isn't there, it isn't available. Never edit them to make code compile. - IDs are namespaced: `"<pluginId>.<Name>"`. - UI must be theme-correct (separate layout from per-theme color; ship light and dark). Register CSS in `plugin.json` `styles`. ## Workflow ``` - [ ] Read AGENTS.md + the matching docs/recipe - [ ] Find the closest existing example in myplugin.example/src and copy its shape - [ ] Confirm API names by grepping types/*.d.ts - [ ] Add code in src/ (same namespace) and register it in ExamplePlugin.ts - [ ] npm run build (must pass with no type errors) ``` ## Best reference: the working example `myplugin.example/` is a complete plugin. Mirror its structure: `ExamplePlugin.ts` (a command + all registrations) and `src/editors/` (a custom editor with content type, New File wizard, Outline, and Inspector).
GitHub에서 보기