Skip to content

Stop committing build output - #16

Merged
mattgodbolt merged 1 commit into
ce-mainfrom
molty/no-dist
Oct 18, 2026
Merged

mattgodbolt merged 1 commit into
ce-mainfrom
molty/no-dist

Conversation

@mattgodbolt-molty

Copy link
Copy Markdown

dist/, the compiled src/css themes (and their maps), build/ns.js and index.html are no longer committed. They're generated by npm run build, and are now in .gitignore.

  • Publishing builds first. A new prepack script runs the build, so npm pack and npm publish always ship freshly built files, whether from the workflow or by hand.
  • CI checks the package instead of the committed copies. The stale-build check is replaced, in both CI and the publish workflow, by a check that npm pack --dry-run includes dist/goldenlayout.js, dist/goldenlayout.min.js, src/css/goldenlayout-base.css and index.d.ts. I ran it locally, and it also fails as it should when a required file is missing.
  • build/ns.js is gone. The build generates the lm namespace declaration inline from the directories under src/js, so a new directory no longer needs a regeneration step. The in-memory test build and watch mode no longer depend on it either.
  • src/css/default-theme.css and src/css/README.md stay committed: they aren't generated.
  • README (development and release steps) and CLAUDE.md updated. Releasing is now: bump the version, merge, then publish a GitHub release.

Same published files. npm pack from a clean checkout, with no build output on disk, produces a package whose dist/ and src/css are byte-identical to the published @compiler-explorer/golden-layout@1.6.1. Only package.json and the README differ. The local build also reproduces every previously committed file exactly. npm test passes from a clean tree with nothing built.

Compiler Explorer installs from npm, so it's unaffected. Anything still installing straight from git (github:compiler-explorer/golden-layout) would get no dist/ from a commit after this one; existing tags like v1.6.0 keep their committed build.

🤖 Generated with Claude Code

dist/, the compiled src/css themes, build/ns.js and index.html are now
build output only. npm pack/publish build them first (prepack), and CI
checks the package has its built files instead of checking the
committed copies are fresh. The `lm` namespace declaration is generated
inside the build, so build/ns.js is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattgodbolt
mattgodbolt merged commit c116775 into ce-main Oct 18, 2026
1 check passed
@mattgodbolt
mattgodbolt deleted the molty/no-dist branch October 18, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants