Skip to content

docs: split the reference out of the README into docs/ - #8

Merged
mschmicking merged 1 commit into
masterfrom
docs-restructure
Aug 8, 2026
Merged

docs: split the reference out of the README into docs/#8
mschmicking merged 1 commit into
masterfrom
docs-restructure

Conversation

@mschmicking

Copy link
Copy Markdown
Owner

The README was 353 lines, 219 of them a single API code block — one continuous listing of JSDoc comments that cannot be linked to, scanned, or read comfortably on a phone.

What moved

File Lines Contents
docs/api.md 351 Full reference with its own TOC, grouped by task rather than declaration order
docs/troubleshooting.md 71 Build failures, including the Windows node-gyp and npm-12 cases
docs/development.md 55 Layout, CI, release process
docs/migrating-to-2.0.md 43 Breaking-changes table and what to check

README: 353 → 100 lines, with a table of contents. It keeps only what someone needs to decide whether to use this and get it running: what it is, install, quick start, doc links, caveats, licence.

Not just a move

The API reference was rewritten as prose with per-method sections, so individual methods are now linkable (docs/api.md#setfieldindex-key-value). Two things that previously existed only in the test suite are now documented:

  • Type-conversion tables, both directions — including that Lua tables always become objects, and that JS arrays become tables keyed by string indices rather than 1-based Lua arrays. That surprises people.
  • Stack-index rules — how relative indices work and why pseudo-indices are exempt.

Troubleshooting also now covers npm 12 blocking install scripts, which every user on npm 12 hits and which was documented nowhere.

Verified

  • README 353 → 100 lines
  • Every local file link and every anchor checked programmatically — all resolve
  • Documentation links are absolute GitHub URLs so they work when npmjs.com renders the README, where relative links break
  • docs/ is not in the files allowlist, so the published tarball does not grow

Stacked on #7

Branched from docs-single-license, so #7's commit appears here too. Merge #7 first and this reduces to the docs commit alone.

🤖 Generated with Claude Code

@mschmicking
mschmicking force-pushed the docs-restructure branch 3 times, most recently from 09cafcc to 01ec1a6 Compare August 8, 2026 08:26
The README was 353 lines, 219 of them a single API code block. That block was
also the worst part of it: one continuous listing of JSDoc comments, which
cannot be linked to, scanned, or read on a phone.

Splits it into docs/ and rewrites the reference as real prose with per-method
sections, grouped by what you are trying to do rather than by declaration order.
Adds the type-conversion tables and the stack-index rules, which were previously
only discoverable by reading the tests.

  docs/api.md               full reference, with its own table of contents
  docs/migrating-to-2.0.md  the breaking-changes table and what to check
  docs/troubleshooting.md   build failures, including the Windows node-gyp and
                            npm-12-blocks-scripts cases users will actually hit
  docs/development.md       layout, CI, and the release process

README keeps what someone needs to decide whether to use this and get it
running: what it is, install, quick start, links, caveats. Now 100 lines with a
table of contents.

Documentation links are absolute GitHub URLs so they also work when the README
is rendered on npmjs.com, where relative links break. docs/ is not in the files
allowlist, so the tarball does not grow.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mschmicking
mschmicking merged commit fa701a2 into master Aug 8, 2026
13 checks passed
@mschmicking
mschmicking deleted the docs-restructure branch August 8, 2026 08:55
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.

1 participant