Development & Contributing

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

Development Build

If you're contributing to this library:

npm install npm run build # produces dist/index.{mjs,cjs}, dist/index.d.ts and the CLI bundle npm test # vitest run npm run typecheck # tsc --noEmit npm run lint # eslint src tests

The prepublishOnly script runs npm run build automatically on npm publish, so the published artifacts always come from a fresh build.

Continuous integration

Every pull request and push to main runs the CI workflow, which executes npm run typecheck, npm run lint, npm test, and npm run build, plus an npm audit --omit=dev step that gates on production-only advisories. Keep these green locally before opening a PR.

Project structure

reactolith/ ├── src/ # library source (App, Router, Mercure, …) ├── tests/ # vitest test suites ├── docs/ # this documentation site ├── rollup.config.mjs # library build config └── package.json

Running the docs locally

cd docs npm install npm run dev

The docs vite project is aliased to ../src/index.ts, so edits to the library source show up in the docs immediately (no library rebuild required).