gfscott / eleventy-plugin-embed-everything

An Eleventy plugin to easily embed common media formats in posts, using only their URLs
https://gfscott.com/embed-everything/
MIT License
99 stars 6 forks source link

Refactor YouTube plugin #222

Closed gfscott closed 9 months ago

gfscott commented 9 months ago

This is a fairly major under-the-hood refactor of the YouTube plugin code. No change to any public API; it produces identical results. It should be more efficient because it parses the regular expression just once (the original architecture does it twice).

I'm also trying out JSdoc comments to experiment with adding type definitions. Again, makes no difference to the end user but gives some more confidence during the development process.

I decided to do this reorganization now because it makes it easier to add new features going forward, such as #205.

Finally, it also adds a files definition in the package.json, so it reduces the package size by about two thirds.

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 128b0ceab85918325d11dcef6a9e5002af3a48bf

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

This PR includes changesets to release 2 packages | Name | Type | | -------------------------------- | ----- | | eleventy-plugin-youtube-embed | Patch | | eleventy-plugin-embed-everything | 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