chore: update package metadata and enhance documentation#309
chore: update package metadata and enhance documentation#309hexqi merged 10 commits intoopentiny:developfrom
Conversation
…t components and kits - Added license, description, repository, and bugs information to package.json files for components, kit, and svgs. - Expanded README.md files for components and kit with detailed features, installation instructions, and usage examples. - Introduced a plugin in vite.config.ts to copy the root README.md to the components directory for better accessibility. - Updated keywords in package.json files to improve discoverability.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughUpdate documentation and package manifests across multiple packages; add a Vite build plugin in Changes
Sequence Diagram(s)sequenceDiagram
participant Vite as "Vite"
participant Plugin as "copyRootReadmeToComponents (Plugin)"
participant FS as "Filesystem (repo root / packages/components)"
Vite->>Plugin: closeBundle
Plugin->>FS: resolve paths for README.md, README.zh-CN.md, LICENSE
Plugin->>FS: existsSync(path) for each file
FS-->>Plugin: file exists / missing
Plugin->>FS: copyFileSync(source, target) for existing files
FS-->>Plugin: copy result
Plugin-->>Vite: done
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Package Previewpnpm add https://pkg.pr.new/opentiny/tiny-robot/@opentiny/tiny-robot@56e027e pnpm add https://pkg.pr.new/opentiny/tiny-robot/@opentiny/tiny-robot-kit@56e027e pnpm add https://pkg.pr.new/opentiny/tiny-robot/@opentiny/tiny-robot-svgs@56e027e commit: 56e027e |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/components/vite.config.ts (1)
12-23: Move README.md copy target to build output directory to avoid mutating tracked source files.Line 21 writes directly to
packages/components/README.mdon every build, mutating a tracked source file. This creates workspace side effects (dirty git state after each build). Copy to the build output directory instead:Suggested fix
-const targetReadme = resolve(__dirname, 'README.md') +const targetReadme = resolve(__dirname, 'dist/README.md') ... -console.log('[tiny-robot] Copied root README.md to packages/components/README.md') +console.log('[tiny-robot] Copied root README.md to packages/components/dist/README.md')🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/components/vite.config.ts` around lines 12 - 23, The closeBundle hook currently copies rootReadme into the source file targetReadme (packages/components/README.md) causing git-dirty builds; change the target to the build output directory instead (e.g. resolve(__dirname, 'dist/README.md') or use the actual outputDir used by the Vite build), ensure the target directory exists before copying, and update the log message accordingly so closeBundle copies rootReadme -> build output README rather than mutating the tracked source README; reference the closeBundle function and the rootReadme/targetReadme variables when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/components/README.md`:
- Line 174: Update the README.md license link in the "MIT License - see
[LICENSE](./LICENSE)" line so it points to the repository root LICENSE file
instead of ./LICENSE; replace the relative target with a correct path (for
example ../../LICENSE from packages/components/README.md or an absolute
/LICENSE) so the link resolves to the repo root LICENSE.
- Around line 35-37: Fix the broken relative links in the package table by
updating the hrefs to be correct from packages/components/README.md: change the
`@opentiny/tiny-robot` link target from `./packages/components` to `.` (or
`./`), change `@opentiny/tiny-robot-kit` from `./packages/kit` to `../kit`, and
change `@opentiny/tiny-robot-svgs` from `./packages/svgs` to `../svgs`; adjust
only the markdown link targets in the table where the package names
`@opentiny/tiny-robot`, `@opentiny/tiny-robot-kit`, and
`@opentiny/tiny-robot-svgs` appear.
---
Nitpick comments:
In `@packages/components/vite.config.ts`:
- Around line 12-23: The closeBundle hook currently copies rootReadme into the
source file targetReadme (packages/components/README.md) causing git-dirty
builds; change the target to the build output directory instead (e.g.
resolve(__dirname, 'dist/README.md') or use the actual outputDir used by the
Vite build), ensure the target directory exists before copying, and update the
log message accordingly so closeBundle copies rootReadme -> build output README
rather than mutating the tracked source README; reference the closeBundle
function and the rootReadme/targetReadme variables when making the change.
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
packages/components/README.mdpackages/components/package.jsonpackages/components/vite.config.tspackages/kit/README.mdpackages/kit/package.jsonpackages/svgs/README.mdpackages/svgs/package.json
- Added homepage field to package.json files for components, kit, and svgs. - Removed the README.md file from the components package to streamline documentation management. - Enhanced vite.config.ts to copy multiple root files (README.md, README_zh.md, LICENSE) to the components directory for better accessibility.
- Created a .gitignore file to exclude README.md, README_zh.md, and LICENSE from version control, ensuring cleaner repository management.
- Bumped version to 0.4.0-alpha.12 in package.json. - Added README files to the list of files included in the package distribution for better documentation accessibility.
- Updated the English README link to point to the new Chinese README file (README.zh-CN.md). - Added a new README.zh-CN.md file for Chinese documentation. - Modified .gitignore to exclude the new README file. - Updated vite.config.ts to copy the new README file during the build process.
- Changed the logo image source to a direct link from the repository. - Updated the Chinese README link to point to the raw file in the repository. - Reformatted the package table for better readability. - Updated the LICENSE link to point to the raw file in the repository.
- Changed logo image source to a direct link from the repository. - Updated links to the English README and LICENSE for better accessibility. - Reformatted the package table for improved readability.
- Changed links in both English and Chinese README files to point directly to the respective Contributing Guide documents on GitHub.
🧹 Preview Cleaned UpThe preview deployment has been removed. |

Summary by CodeRabbit
Documentation
Chores
Packaging