Skip to content

npm package: only dist and src - #23

Merged
robdobsn merged 1 commit into
mainfrom
feature/npm-package-files
Oct 25, 2026
Merged

robdobsn merged 1 commit into
mainfrom
feature/npm-package-files

Conversation

@robdobsn

Copy link
Copy Markdown
Owner

Adds a files list to package.json, so the npm package holds only what users of the package need:

  • dist: everything main, types and react-native point to;
  • src without its test files: the source maps in dist refer to ../../src/*.ts and don't embed the source, so debuggers need it;
  • package.json, README.md and LICENSE, which npm always includes.

Left out: apps/, examples/, devdocs/, testdata/, tests/, TODO.md and config files. The apps and the dashboard import raftjs as ../../../src and need their own dependencies, so they can't run from node_modules; they're on GitHub and published as web pages. 2.10.0 is 4.7 MB unpacked (470 files). npm pack --dry-run with this change lists 291 files, about 2.5 MB (built from an older local dist).

Takes effect from the next release; 2.10.0 on npm is unchanged.

🤖 Generated with Claude Code

…xamples, tests or docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robdobsn
robdobsn merged commit 3222f8c into main Oct 25, 2026
1 check passed
@robdobsn
robdobsn deleted the feature/npm-package-files branch October 25, 2026 12:34
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