Skip to content

docs: fill in HOW-IT-WORKS.md and CLI.md placeholders - #429

Merged
kraenhansen merged 1 commit into
nextfrom
claude/issue-425-docs-placeholders
Aug 13, 2026
Merged

docs: fill in HOW-IT-WORKS.md and CLI.md placeholders#429
kraenhansen merged 1 commit into
nextfrom
claude/issue-425-docs-placeholders

Conversation

@kraenhansen

Copy link
Copy Markdown
Collaborator

Summary

Closes #425 — fills in the four TODO HTML comments left in the published docs.

docs/HOW-IT-WORKS.md

Replaced the three placeholders near the top with a concrete, runnable example of calculator-lib:

  • Clone instructions for readers who want to follow along with the source referenced later in the document (e.g. packages/host/cpp/HermesNapiHost.cpp).
  • The C++/C side of the addon — the same addon.c (Add function + NAPI_MODULE_INIT) already walked through in docs/USAGE.md, so the two docs stay consistent.
  • The JS that requires the prebuilt binary and the JS that my-app uses to import and call add.

The rest of the document's prose was left untouched — it already referred to this example, it just wasn't shown to the reader beforehand.

docs/CLI.md

Replaced the single TODO with hand-written documentation for all five commands exposed by the react-native-node-api CLI, referencing the Commander definitions in packages/host/src/node/cli/:

  • vendor-hermes [from]
  • link [path]
  • list [from-path]
  • info <path>
  • patch-xcode-project [path]

Each section documents the command's purpose, arguments and options (pulled from program.ts, hermes.ts and options.ts), plus a shared table explaining the strip / keep / omit library-naming strategies used by --package-name and --path-suffix (sourced from the doc comments in path-utils.ts). I went with hand-written docs (per the issue's "worth deciding") rather than building a generator, and added a note pointing back at the source files so it's clear this needs to be kept in sync by hand.

Verification

  • pnpm exec prettier --check docs/HOW-IT-WORKS.md docs/CLI.md passes (ran --write once to fix docs/CLI.md's table formatting).
  • Docs-only change; no changeset added per repo convention.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DaK9eAAF5G8wj6UT8VekAm


Generated by Claude Code

- HOW-IT-WORKS.md: replace the three TODO comments near the top with
  a real, runnable example of calculator-lib's native C addon (mirrors
  docs/USAGE.md) plus the JS that requires and calls it, and clone
  instructions for readers who want to follow along with the source
  referenced later in the document.
- CLI.md: hand-write documentation for all five react-native-node-api
  CLI commands (vendor-hermes, link, list, info, patch-xcode-project),
  their options and the shared library-naming strategies, sourced from
  packages/host/src/node/cli/program.ts, hermes.ts and options.ts, with
  a note to keep it in sync with those definitions.

Fixes #425

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DaK9eAAF5G8wj6UT8VekAm
@kraenhansen
kraenhansen merged commit 28fb6d3 into next Aug 13, 2026
16 checks passed
@kraenhansen
kraenhansen deleted the claude/issue-425-docs-placeholders branch August 13, 2026 08:12
kraenhansen added a commit that referenced this pull request Aug 13, 2026
- HOW-IT-WORKS.md: replace the three TODO comments near the top with
  a real, runnable example of calculator-lib's native C addon (mirrors
  docs/USAGE.md) plus the JS that requires and calls it, and clone
  instructions for readers who want to follow along with the source
  referenced later in the document.
- CLI.md: hand-write documentation for all five react-native-node-api
  CLI commands (vendor-hermes, link, list, info, patch-xcode-project),
  their options and the shared library-naming strategies, sourced from
  packages/host/src/node/cli/program.ts, hermes.ts and options.ts, with
  a note to keep it in sync with those definitions.

Fixes #425


Claude-Session: https://claude.ai/code/session_01DaK9eAAF5G8wj6UT8VekAm

Co-authored-by: Claude <noreply@anthropic.com>
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.

Fill in the placeholders in docs/HOW-IT-WORKS.md and docs/CLI.md

2 participants