Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: setup twoslash for codeblocks #2668

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

Open
antfu wants to merge 7 commits into vuejs:main
base: main
Choose a base branch
Loading
from antfu:feat/twoslash
Open

Conversation

Copy link
Member

@antfu antfu commented Jan 15, 2024
edited
Loading

This is working now, but with a few caveats:

Preview

image

Short-term

Long-term

  • __VUE_OPTIONS_API__: true is required at this moment because floating-vue is still using Options API
  • (削除) shamefully-hoist=true is required at this moment for twoslash to resolve the types correctly (削除ここまで)

And later we need to revise code blocks across the docs to add the twoslash flag.

sxzz and icarusgk reacted with thumbs up emoji stafyniaksacha, sadeghbarati, and icarusgk reacted with hooray emoji posva and icarusgk reacted with rocket emoji
Copy link

netlify bot commented Jan 15, 2024
edited
Loading

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit c417157
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/65e72cc7e95a7e0008476cf4
😎 Deploy Preview https://deploy-preview-2668--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu marked this pull request as ready for review February 6, 2024 14:25
Copy link
Member Author

antfu commented Feb 6, 2024

I think it's ready now. The only thing is that if we should bring Options API or wait for Floating Vue to adopt to Composition API only

Copy link
Member

@antfu thank you for working on this! Looks great ✨

Could you please resolve the conflicts? I'll merge the PR and add twoslash to the codeblocks

Copy link
Member

brc-dd commented Feb 17, 2024
edited
Loading

I'll release vitepress by tomorrow. It will have shiki@v1. We can remove resolutions from package.json here.

Also, is it possible to use the older code background with twoslash? github-dark's default background doesn't look nice with other stuff.

Copy link
Member

Let's enable Options API then, it's ok for now until we have a version of floating-vue that is Composition API based.

antfu reacted with thumbs up emoji

Copy link
Member Author

antfu commented Mar 5, 2024

Should be good to go now

Copy link
Member

I think we need to be a bit selective on where to use these, let me take a pass on the rest of the docs so it doesn't become distractive.

antfu reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /