Skip to content

CI and Packaging

The CI workflow verifies source quality, catalog determinism, extension-host behavior, and the packaged VSIX.

CI checks

.github/workflows/verify.yml runs on pushes and pull requests for main:

  1. installs Node 22, Python 3.14, npm dependencies, and the locked uv environment;
  2. runs ESLint, TypeScript type checking, Ruff checks, Pyrefly checks, and Python tests;
  3. runs TypeScript unit tests;
  4. regenerates htmx.catalog.json, snippets/django-htmx.json, and docs/reference/snippets.md, then checks for diffs;
  5. validates HTMX pin freshness and builds the documentation with strict warnings;
  6. runs VS Code extension-host smoke tests through Xvfb;
  7. packages and lists the VSIX contents.

Package locally

npm run package
npx vsce ls --tree

vsce package runs vscode:prepublish, which type-checks with tsc --noEmit and bundles src/extension.ts into a single minified dist/extension.js with esbuild (the vscode module stays external). The package should include that bundle, htmx.catalog.json, the Django snippets, README, license, icon, banner, and editor screenshots. .vscodeignore removes source files, the out/ test build, esbuild.js, tests, docs, local caches, Python tooling, and Node tooling from the VSIX.

The tsc build in out/ is used only by the unit and extension-host tests; test:extension bundles first because the extension host loads dist/extension.js through the manifest main field.

Refresh presentation assets

Run npm run capture-screenshots before packaging when an editor interaction changes. It deterministically replaces the generated diagnostics and partial PNGs plus the animated attribute, value, and hover demos in both images/ and docs/assets/images/. The extension icon and Marketplace banner are not generated by this command.

Test the artifact

After packaging, sideload the VSIX and run the interactive smoke checklist locally. The commands and checklist are documented in Local Extension Testing.