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-device-info/srcThe TypeScript API and the DeviceInfo.nitro.ts Nitro spec.
packages/nitro-device-info/iosThe Swift implementation.
packages/nitro-device-info/android/src/main/java/…The Kotlin implementation.
exampleA NitroUI app that shows every value, and the native tests.
websiteThis documentation site.

After changing DeviceInfo.nitro.ts or a type in src/types, regenerate the bindings with bun run specs. Never edit nitrogen/generated.

Checks​

CI runs these on every pull request. Run them before you push:

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

Native behaviour is covered by harness tests in example/__tests__; see Example app. Name tests that only apply to one platform *.ios.harness.ts or *.android.harness.ts.

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 typecheck
bun run build # fails on broken links and anchors

When you change the public API, update website/docs/api/ and the package README together. The changelog page renders packages/nitro-device-info/CHANGELOG.md directly.