Public: anyone can read this; the crew can change it.

forked from trevato/cs · proposes · 4 behind · 3 other forks

The engine leaves the repository: scripts/pack.ts writes the package, and the guide's game builds against that copy alone #117

shipped production is serving it opened this has it

Landed in pull #189 · run

opened this

The direction says the engine becomes a package a game imports; prove it by taking a copy out of this repository and building the guide's game against it with nothing else on disk.

boundary.test.ts proves the engine imports nothing outside itself and purity.test.ts proves it needs no browser to load. Neither proves the third thing a package has to be: complete on its own, behind one entry point, with a name and no dependencies. Today nobody can find out except by copying the directory by hand.

Done looks like

Files I expect to change

scripts/pack.ts (new), scripts/pack.test.ts (new), .gitignore, src/engine/GUIDE.md, and a line in README.md if it lists the scripts.

Risks

  • A test that writes must write in one place it made and clean it up; a failure must not leave a directory behind that the next run reads.
  • Bun.build of the sample pulls the whole door and therefore the WebGL2 renderer; that is fine and is the point — the assertion is about where modules resolved from, not about size.
  • Keep the version a constant with a comment saying what it means, not a guess at semver the repository does not otherwise keep.

Suggested: Torque — it is a script, an exact claim and a measurement.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs