Skip to content

fix: add language-specific README files for npm and crates.io#20

Merged
konard merged 4 commits intomainfrom
issue-19-bef12b396c1f
Jan 10, 2026
Merged

fix: add language-specific README files for npm and crates.io#20
konard merged 4 commits intomainfrom
issue-19-bef12b396c1f

Conversation

@konard
Copy link
Member

@konard konard commented Jan 10, 2026

Summary

  • Create language-specific README.md files for each implementation:
    • js/README.md: JavaScript/npm-specific documentation with installation and API usage
    • rust/README.md: Rust/Cargo-specific documentation
    • Root README.md: Common overview linking to both implementations
  • Remove README copy step from CI workflow (no longer needed)
  • Remove js/README.md from .gitignore (now tracked in git)

Approach (per feedback)

Instead of copying the root README during npm publish, we now maintain separate documentation:

  1. Common README.md (root): Language-agnostic overview with links to implementations
  2. js/README.md: Full JavaScript/npm documentation with installation, quick start, API reference
  3. rust/README.md: Full Rust/Cargo documentation with installation, examples, API reference

This approach:

  • Provides appropriate documentation for each package manager
  • Eliminates the need for copying files during CI
  • Allows each implementation to have tailored documentation

Test plan

  • Verified locally with npm pack --dry-run that README.md (8.8kB) is included in tarball
  • CI lint and format checks pass

Fixes #19

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #19
@konard konard self-assigned this Jan 10, 2026
Copy README.md from repository root to js/ directory before npm publish
so the package documentation is visible on npmjs.com.

This fixes the issue where the npm package was missing documentation
because the package is published from the js/ subdirectory.

Fixes #19

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] On publish the JavaScript package does not have a README on npm fix: include README.md in npm package Jan 10, 2026
@konard konard marked this pull request as ready for review January 10, 2026 01:18
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard
Copy link
Member Author

konard commented Jan 10, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.670940 USD
  • Calculated by Anthropic: $1.642957 USD
  • Difference: $-1.027983 (-38.49%)
    📎 Log file uploaded as GitHub Gist (378KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Jan 10, 2026

As we now have two saparate language versions, I think we should have README.md files in both JS and Rust forlders, and have common README.md that is not specific to any of these languages.

So we should have common README.md, and language specific ones that will go directly to their respective package managers.

I don't like the idea of just coping README.md file.

@konard konard marked this pull request as draft January 10, 2026 13:09
@konard
Copy link
Member Author

konard commented Jan 10, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-10T13:09:39.412Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

- Create js/README.md with JavaScript/npm-specific documentation
- Create rust/README.md with Rust/Cargo-specific documentation
- Update root README.md to be language-agnostic with links to implementations
- Remove README copy step from CI workflow (no longer needed)
- Remove js/README.md from .gitignore (now tracked in git)

This approach provides proper documentation for each package manager:
- npm package gets js/README.md directly from the repository
- crates.io can use rust/README.md
- Root README provides overview linking to both implementations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title fix: include README.md in npm package fix: add language-specific README files for npm and crates.io Jan 10, 2026
@konard konard marked this pull request as ready for review January 10, 2026 13:19
@konard
Copy link
Member Author

konard commented Jan 10, 2026

🤖 Solution Updated

Based on the feedback about having separate README files for each language implementation, the solution has been revised:

Changes Made

  1. Root README.md - Now language-agnostic overview with:

    • Table of available implementations (JS and Rust with package badges)
    • Core concept explanation (page state machine)
    • Page trigger lifecycle description
    • Links to language-specific READMEs
  2. js/README.md (new file) - JavaScript/npm-specific documentation with:

    • npm installation instructions
    • Quick start with JavaScript examples
    • Full API reference
    • Best practices
  3. rust/README.md (new file) - Rust/Cargo-specific documentation with:

    • Cargo.toml installation instructions
    • Quick start with Rust examples
    • API reference for Rust types
  4. CI workflow - Removed the README copy step (no longer needed)

  5. .gitignore - Removed js/README.md entry (now tracked in git)

Verification

  • npm pack --dry-run confirms README.md (8.8kB) is included in the npm tarball
  • ✅ JS CI/CD Pipeline passed
  • ✅ Rust CI/CD Pipeline passed

The PR is now ready for review.

@konard
Copy link
Member Author

konard commented Jan 10, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.060095 USD
  • Calculated by Anthropic: $1.966158 USD
  • Difference: $-1.093937 (-35.75%)
    📎 Log file uploaded as GitHub Gist (456KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 0a9e1dc into main Jan 10, 2026
18 checks passed
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.

On publish the JavaScript package does not have a README on npm

1 participant