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:
- installs Node 22, Python 3.14, npm dependencies, and the locked uv environment;
- runs ESLint, TypeScript type checking, Ruff checks, Pyrefly checks, and Python tests;
- runs TypeScript unit tests;
- regenerates
htmx.catalog.json,snippets/django-htmx.json, anddocs/reference/snippets.md, then checks for diffs; - validates HTMX pin freshness and builds the documentation with strict warnings;
- runs VS Code extension-host smoke tests through Xvfb;
- packages and lists the VSIX contents.
Package locally¶
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.