left4me/l4d2web/l4d2web/static/vendor
mwiegand 2d5a72b317
fix(editor): rebuild script and docs cover both bundles
build-editor.sh was calling npx esbuild directly for editor-entry.js
only, leaving vocab-rank.bundle.js stale when devs used the documented
rebuild path. Switch to npm run build (the single source of truth in
package.json) so both bundles are always rebuilt together. Add
vocab-rank.bundle.js to the sha256 manifest and update the vendor README
to describe both build artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 18:21:47 +02:00
..
editor.bundle.css feat(editor-v2): build script + first bundle output 2026-05-17 01:58:46 +02:00
editor.bundle.js refactor(editor): use shared rankVocab in autocomplete 2026-05-17 17:37:54 +02:00
editor.bundle.sha256 fix(editor): rebuild script and docs cover both bundles 2026-05-17 18:21:47 +02:00
htmx.min.js refactor(repo): uv workspace + hatchling + layout restructure 2026-05-15 22:04:29 +02:00
README.md fix(editor): rebuild script and docs cover both bundles 2026-05-17 18:21:47 +02:00
vocab-rank.bundle.js feat(editor): build standalone vocab-rank bundle for console 2026-05-17 17:41:24 +02:00

Editor bundle vendor README

This directory contains pre-built JavaScript bundles produced by esbuild from l4d2web/scripts/editor-src/:

  • editor.bundle.js — CodeMirror 6 IIFE, exposes window.__editor.mount(textarea, opts).
  • vocab-rank.bundle.js — vocabulary ranking helpers used by the console autocomplete.
  • editor.bundle.css — placeholder CSS file (always empty; cm6 injects styles at runtime via StyleModule).

Rebuild

From repo root:

./l4d2web/scripts/build-editor.sh

This runs npm install inside editor-src/ then npm run build, which rebuilds all bundles (editor.bundle.js and vocab-rank.bundle.js) in one pass. The output overwrites the bundles in this directory and refreshes editor.bundle.sha256.

The build script uses $TMPDIR/npm-cache (override with the NPM_CACHE env var) as the npm cache to avoid permission issues with root-owned files in ~/.npm/_cacache/ from older npm versions.

Pinned dependencies

See l4d2web/scripts/editor-src/package.json for semver ranges and package-lock.json for the exact resolved versions. Run npm outdated inside editor-src/ to see upgrade candidates.

Integrity

editor.bundle.sha256 contains the hashes of the committed bundles (editor.bundle.js, editor.bundle.css, vocab-rank.bundle.js). If a bundle drifts from its hash in CI / review, the artifact was rebuilt without committing the updated bundle.