Back to docs

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 install

Build

Build both the extension host and the Kanban webview:

bun run compile:all

Or build them separately:

bun run compile          # Extension host only
bun run compile:webview  # Webview only

Watch Mode

For development, use watch mode to auto-rebuild on file changes:

bun run watch:all

This watches both the extension host and webview source files.

Launch the Extension Development Host

  1. Open the Opentix project folder in VS Code
  2. Press F5 (or Run > Start Debugging)
  3. 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:

  1. Run bun run compile:all
  2. In the Extension Development Host: Cmd+Shift+PDeveloper: Reload Window

With watch mode running, you only need to reload the window.

Running Tests

Unit Tests

bun run test:unit

Unit 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:integration

Integration tests use @vscode/test-electron to test against the real VS Code API.

All Tests

bun run test

Runs both unit and integration tests sequentially.

Linting

bun run lint

Uses ESLint with TypeScript rules.

Packaging

To build a .vsix package for distribution:

bun run package

This runs vsce package which bundles the extension for installation.

Build Scripts Reference

ScriptDescription
bun run compileBuild extension host (CJS, Node target)
bun run compile:webviewBuild webview (IIFE, browser target)
bun run compile:allBuild both
bun run watch:allWatch mode for both
bun run test:unitRun unit tests (Vitest)
bun run test:integrationRun integration tests (vscode-test-electron)
bun run testRun all tests
bun run lintLint source files
bun run packagePackage as .vsix

Next Steps