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> |
||
|---|---|---|
| .. | ||
| editor.bundle.css | ||
| editor.bundle.js | ||
| editor.bundle.sha256 | ||
| htmx.min.js | ||
| README.md | ||
| vocab-rank.bundle.js | ||
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, exposeswindow.__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.