Skip to main content

Contributing

Bug reports, fixes and documentation improvements are welcome. Report a bug with the bug template.

Set up​

You need Bun 1.4.4 or newer. iOS work needs Xcode 27; Android work needs the Android SDK and NDK that NitroUI requires.

bun install # links the workspace, generates bindings and prepares the example
PathContents
packages/nitro-view-shot/srcThe TypeScript API and the ViewShot.nitro.ts Nitro spec.
packages/nitro-view-shot/iosThe Swift implementation.
packages/nitro-view-shot/android/src/main/java/…The Kotlin implementation.
exampleA NitroUI app that calls the API, and the native tests.
websiteThis documentation site.

After changing ViewShot.nitro.ts or a type it uses, regenerate the bindings with bun run specs. Never edit nitrogen/generated.

Checks​

CI runs these on every pull request:

bun run lint
bun run format:check # `bun run format` fixes formatting
bun run typecheck

Native behavior is covered by harness tests in example/__tests__, which run inside the example app:

bun run test:ios --device "<simulator name or UDID>"
bun run test:android --device <adb-serial>

Name tests that only apply to one platform *.ios.harness.ts or *.android.harness.ts.

Pull requests​

  • Keep the Swift and Kotlin implementations in step. If a behavior differs between platforms, document it in the package README and on Platform differences.
  • Add an entry under ## [Unreleased] in packages/nitro-view-shot/CHANGELOG.md for user-visible changes.
  • Add or update harness tests for native behavior.

Docs site​

The site is a standalone Docusaurus project in website/, outside the root workspaces:

cd website
bun install
bun run start # dev server with hot reload
bun run build # production build; broken links fail it

The changelog page renders packages/nitro-view-shot/CHANGELOG.md directly.