Development Setup
Set up the Opentix extension for local development, testing, and debugging.
Prerequisites
- Bun (recommended) or Node.js 18+
- VS Code 1.85 or newer
- Git
Clone and Install
git clone https://github.com/jpmadrigal07/opentix.git
cd opentix
bun installBuild
Build both the extension host and the Kanban webview:
bun run compile:allOr build them separately:
bun run compile # Extension host only
bun run compile:webview # Webview onlyWatch Mode
For development, use watch mode to auto-rebuild on file changes:
bun run watch:allThis watches both the extension host and webview source files.
Launch the Extension Development Host
- Open the Opentix project folder in VS Code
- Press F5 (or Run > Start Debugging)
- A second VS Code window opens as the Extension Development Host
The Extension Development Host runs the extension from the dist/ build output. You can test all Opentix features in this window.
After Changing Code
If you are not using watch mode:
- Run
bun run compile:all - In the Extension Development Host: Cmd+Shift+P → Developer: Reload Window
With watch mode running, you only need to reload the window.
Running Tests
Unit Tests
bun run test:unitUnit tests live in test/unit/ and use Vitest. They cover pure utility functions like ID generation, Markdown parsing, branch name detection, and sprint date logic.
Integration Tests
bun run test:integrationIntegration tests use @vscode/test-electron to test against the real VS Code API.
All Tests
bun run testRuns both unit and integration tests sequentially.
Linting
bun run lintUses ESLint with TypeScript rules.
Packaging
To build a .vsix package for distribution:
bun run packageThis runs vsce package which bundles the extension for installation.
Build Scripts Reference
| Script | Description |
|---|---|
bun run compile | Build extension host (CJS, Node target) |
bun run compile:webview | Build webview (IIFE, browser target) |
bun run compile:all | Build both |
bun run watch:all | Watch mode for both |
bun run test:unit | Run unit tests (Vitest) |
bun run test:integration | Run integration tests (vscode-test-electron) |
bun run test | Run all tests |
bun run lint | Lint source files |
bun run package | Package as .vsix |
Next Steps
- Read the architecture overview to understand the codebase structure