Skip to content

build: lib/ pipeline via react-native-builder-bob (closes #47)#48

Open
LeslieOA wants to merge 1 commit into
developfrom
feat/build-pipeline
Open

build: lib/ pipeline via react-native-builder-bob (closes #47)#48
LeslieOA wants to merge 1 commit into
developfrom
feat/build-pipeline

Conversation

@LeslieOA

Copy link
Copy Markdown
Member

Summary

  • Closes Build pipeline for lib/ — unblock npm publish #47. package.json's main/module/types pointed at lib/… paths nothing generated — we'd been relying on metro's source exports condition for local-path consumers. A real npm tarball needs compiled output. This is the last scaffolding gate before v1.0 is publishable.
  • Adds react-native-builder-bob (the standard RN-library build tool).

Changes

  • bob config: module (ESM) + typescript targets → lib/module/ + lib/typescript/, matching the paths declared in main/module/types/exports. ESM-only — CJS addable later if needed.
  • Scripts: build, clean, prepare (runs bob build on install + before npm publish).
  • package.json: add source + module fields; exports keeps source first so metro/local-path dev still reads src/ directly.
  • .gitignore: lib/.
  • CI: typecheck job now does npm ci --ignore-scripts then an explicit npm run build step, so a broken build is caught and attributable.

Test plan

  • npm run buildlib/module/index.js + lib/typescript/src/index.d.ts.
  • npm pack --dry-run → 49 files: lib output + src + ios + android/src (incl. TextMate assets) + podspec + app.plugin.js + react-native.config.js. node_modules/example/ excluded.
  • root + example typecheck clean.

Not in scope

Actual npm publish — that's the v1.0 release moment.

🤖 Generated with Claude Code

package.json's main/module/types pointed at lib/… paths that nothing
generated — we'd been relying on metro's `source` exports condition for
local-path consumers. A real npm tarball needs compiled output. This
adds the build so the package is publishable.

- Add react-native-builder-bob + del-cli devDeps.
- bob config: module (ESM) + typescript targets → lib/module/ +
  lib/typescript/. Matches the paths declared in main/module/types/
  exports. ESM-only (no commonjs) — RN + modern bundlers consume ESM;
  can add CJS later if a consumer needs it.
- Scripts: `build` (bob build), `clean` (del lib), `prepare` (bob build
  — runs on install + before npm publish).
- Add `source` + `module` fields; exports keeps the `source` condition
  first so metro/local-path dev still reads src/ directly.
- .gitignore lib/ (build artifact).
- CI typecheck job: `npm ci --ignore-scripts` then explicit
  `npm run build` step so a broken build is caught and attributable.

Verified:
- npm run build → lib/module/index.js + lib/typescript/src/index.d.ts.
- npm pack --dry-run → 33 files: lib compiled output, src, ios,
  android/src + TextMate assets, podspec, app.plugin.js,
  react-native.config.js. node_modules + example/ excluded.
- root + example typecheck clean.

Last scaffolding gate before v1.0 is publishable.
@LeslieOA LeslieOA force-pushed the feat/build-pipeline branch from e7778aa to 834ee24 Compare May 29, 2026 15:15
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.

Build pipeline for lib/ — unblock npm publish

1 participant