Development
This guide covers how to set up a development environment for PremiAnno and contribute to the project.
Prerequisites
Before you begin, ensure you have:
- Node.js: v20 or later
- pnpm: v10.18.3 or later (see
packageManagerin root package.json) - Adobe Premiere Pro: For testing
- Git: For version control
Setup
1. Clone the Repository
bash
git clone https://github.com/rmuraix/premianno.git
cd premianno2. Install Dependencies
bash
pnpm installThis will install all dependencies for the monorepo, including both the lib package and docs package.
Development Commands
Building the Extension
bash
# Build the extension
pnpm lib build
# Build in watch mode (hot reload)
pnpm lib dev
# Build and package as ZXP
pnpm lib zxpRunning Documentation
bash
# Start documentation dev server
pnpm docs dev
# Build documentation
pnpm docs build
# Preview built documentation
pnpm docs previewCode Quality
bash
# Run linter
pnpm biome check .
# Fix linting issues
pnpm biome check . --fixCEP Development Setup
Loading the Extension for Development
CEP extensions can be loaded for development by symlinking to Adobe's extensions folder.
- Build the extension with
pnpm lib build - The extension will be symlinked automatically to the CEP extensions folder
- Restart Adobe Premiere Pro
- Navigate to Window > Extensions > PremiAnno
Debugging
CEP extensions use Chromium DevTools for debugging:
- Enable debug mode by creating a
.debugfile in your extension directory - Set the debug port in
cep.config.ts(default: 8860) - Open Chrome and navigate to
http://localhost:8860 - Use the Console, Elements, and Sources tabs to debug
Note: Use pnpm lib dev with the built-in WebSocket reload system for more reliable hot reloading during development.
Project Structure
premianno/
├── packages/
│ ├── lib/ # Main CEP extension
│ │ ├── src/
│ │ │ ├── js/ # React panel app + CEP bridge
│ │ │ ├── jsx/ # ExtendScript host functions
│ │ │ └── shared/ # Shared type definitions
│ │ ├── dist/ # Build output
│ │ └── package.json
│ └── docs/ # VitePress documentation
│ ├── .vitepress/
│ ├── guide/
│ ├── api/
│ └── package.json
├── .github/
│ └── workflows/ # CI/CD workflows
├── biome.json # Biome configuration
├── pnpm-workspace.yaml # pnpm workspace config
└── package.json # Root package.jsonArchitecture
Extension Architecture
PremiAnno is built using:
- React 19: UI framework
- TypeScript: Type-safe development
- Vite: Build tool and dev server
- vite-cep-plugin: CEP/host integration and packaging
- Adobe Premiere Pro CEP/ExtendScript: Host integration
Key Components
- React Panel UI: Scan/import/label/export workflow
- Host Bridge: Calls ExtendScript functions from panel code
- Annotation Store: Local JSON persistence per project/sequence
- Export Layer: TOML serialization for downstream processing
Contributing
Workflow
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Code Style
- Follow the existing code style
- Use TypeScript for type safety
- Write meaningful commit messages
- Add comments for complex logic
Testing
- Test changes in Adobe Premiere Pro
- Verify hot reload functionality
- Test export functionality
- Check for console errors
Pull Request Guidelines
- Describe your changes clearly
- Reference related issues
- Include screenshots for UI changes
- Ensure CI checks pass
Building for Distribution
Creating a ZXP Package
bash
# Build and package
pnpm lib zxpThis generates release artifacts under packages/lib/dist/zxp/.