Development

Build a release-safe extension locally.

SubMate uses TypeScript, esbuild, Vitest, and a small set of explicit production packaging scripts.

Prerequisites

Install Node.js 20 or later (CI uses Node 22), npm 10 or later, and Chrome 138 or later for live validation.

Set up

Clone the repository, then run npm ci. Keep generated dist/ files out of commits.

Validate and package

  • npm run check type-checks the source.
  • npm test runs unit, integration, and UI-harness tests.
  • npm run build:chrome creates a minified Manifest V3 build at dist/chrome/.
  • npm run validate:chrome verifies manifest versions, required files, and the absence of source maps.
  • npm run pack:chrome builds, validates, and writes the root-layout store ZIP to dist/packages/.
  • npm run validate runs the full CI gate.

Architecture

The platform adapters stay separate from the shared translation, caching, synchronization, and renderer core. Read Architecture before adding a service or changing shared behavior.