Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add @shikiji/vitepress-twoslash #5445

Merged
merged 4 commits into from
Apr 3, 2024

Conversation

sapphi-red
Copy link
Contributor

@sapphi-red sapphi-red commented Mar 27, 2024

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

This PR adds @shikiji/vitepress-twoslash so that users can hover on the code and see the types.
Example with the vite docs: https://elk.zone/m.webtoo.ls/@sapphi_red/112131987169625108
https://rollup-git-fork-sapphi-red-docs-twoslash-rollup-js.vercel.app/plugin-development/#this-load

Copy link

vercel bot commented Mar 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2024 0:17am

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.80%. Comparing base (23d5282) to head (505cb9b).
Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5445   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files         236      237    +1     
  Lines        9423     9432    +9     
  Branches     2398     2398           
=======================================
+ Hits         9310     9319    +9     
  Misses         48       48           
  Partials       65       65           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is truly amazing. Makes me wonder if we should start using adding doc comments in the docs, but I would only want to do that if I can then move the entire documentation into the types to avoid the duplicity. Not sure if this is worth it. Just some minor comments for the AMD section, but otherwise I do not see why we cannot merge this, this must have been a ton of work!

docs/configuration-options/index.md Outdated Show resolved Hide resolved
docs/configuration-options/index.md Outdated Show resolved Hide resolved
docs/configuration-options/index.md Outdated Show resolved Hide resolved
docs/configuration-options/index.md Outdated Show resolved Hide resolved
docs/configuration-options/index.md Outdated Show resolved Hide resolved
docs/configuration-options/index.md Outdated Show resolved Hide resolved
Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
@sapphi-red
Copy link
Contributor Author

Makes me wonder if we should start using adding doc comments in the docs, but I would only want to do that if I can then move the entire documentation into the types to avoid the duplicity.

Yeah, it would be nice to do that. But I haven't found a good way yet.

@lukastaegert lukastaegert added this pull request to the merge queue Apr 3, 2024
Merged via the queue into rollup:master with commit c87901d Apr 3, 2024
30 checks passed
Copy link

github-actions bot commented Apr 3, 2024

This PR has been released as part of rollup@4.14.0. You can test it via npm install rollup.

@sapphi-red sapphi-red deleted the docs/twoslash branch April 3, 2024 06:50
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.

None yet

2 participants