Conversation
We use vitepress features to directly include and truncate the help.md file. We use a VSCode region to trim the CLI options, which means we need to filter the comments when loading the file.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There were some changes that were not committed with some dependency update.
6112065 to
e4b8b41
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the CLI help documentation to eliminate duplication between the CLI help file and the website documentation. Instead of maintaining two separate copies of the CLI options, the website now includes the help file content using VitePress's snippet inclusion feature.
Key changes:
- Created a custom Rollup plugin to load and process the help file with version replacement and line length validation
- Updated the help file to use region markers for VitePress snippet extraction and consistent formatting
- Modified the documentation to include the help file content rather than duplicating it
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| build-plugins/load-cli-help.ts | New custom plugin that loads help.md, strips comment markers, validates 80-character line limit, and replaces version placeholder |
| cli/cli.ts | Simplified to output help text directly without version replacement (now handled by build plugin) |
| cli/help.md | Added VitePress region markers, reformatted multi-line descriptions to use consistent spacing instead of tabs |
| docs/command-line-interface/index.md | Replaced duplicated CLI options list with VitePress snippet inclusion syntax |
| rollup.config.ts | Replaced rollup-plugin-string with custom loadCliHelp plugin |
| typings/declarations.ts | Removed unused declaration for rollup-plugin-string |
| package.json | Removed rollup-plugin-string dependency |
| package-lock.json | Updated lock file to remove rollup-plugin-string and adjust peer dependency markers |
| wasm/bindings_wasm.d.ts | Added blank lines between function declarations for improved formatting |
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#deduplicate-help-mdNotice: Ensure you have installed the latest nightly Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust. or load it into the REPL: |
Performance report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6223 +/- ##
==========================================
+ Coverage 98.79% 98.81% +0.01%
==========================================
Files 271 272 +1
Lines 10683 10684 +1
Branches 2862 2862
==========================================
+ Hits 10554 10557 +3
+ Misses 86 85 -1
+ Partials 43 42 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
We currently duplicate the CLI options between the CLI help.md file that is printed when running
rollupwithout options and the website. This is addressed by instead including the file in the website and using Vitepress tricks to remove header and examples.