shikijs / twoslash

You take some Shiki, add a hint of TypeScript compiler, and πŸŽ‰ incredible static code samples
https://shikijs.github.io/twoslash/
MIT License
1.09k stars 53 forks source link

feat(docusaurus-preset): support shorthands, support mix of preset and plugin #138

Closed Josh-Cena closed 2 years ago

Josh-Cena commented 2 years ago

Close #137.

In addition to adding the shorthand names, this PR also makes the preset modify standalone plugins in addition to presets. Because each preset only comes with one plugin, if the user wants additional doc plugins (not unusual!), they would need to use the plugins field. Therefore, it's always necessary for us to search for both.

Also added support for plugins defined inline, which are functions instead of string names.

changeset-bot[bot] commented 2 years ago

πŸ¦‹ Changeset detected

Latest commit: 4f93b3b4ad705cbe0d0828e901e8b91ccbdff35d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------------------------- | ----- | | docusaurus-preset-shiki-twoslash | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

orta commented 2 years ago

Shipped: https://github.com/shikijs/twoslash/runs/5246931106?check_suite_focus=true#step:10:36

Josh-Cena commented 2 years ago

Already using itπŸ˜† Works great