cucumber / vscode

Official Visual Studio Code Extension for Cucumber
MIT License
65 stars 16 forks source link

Optimise bundle by storing documentation images in the GitHub CDN #194

Closed kieran-ryan closed 9 months ago

kieran-ryan commented 9 months ago

🤔 What's the problem you're trying to solve?

The size of the latest release is 15.7MB. Extracting the extension, this is largely images used for documentation; and contains files that are not required in the bundle - such as the helper script to update settings.

This is significantly larger than the code of the extension itself, and thus represents a large overhead across downloads - particularly as the documentation images in any case are served through the GitHub CDN in the extension marketplace, rather than from the bundle.

✨ What's your proposed solution?

⛏ Have you considered any alternatives or workarounds?

User has no alternative but to download the full bundle. Not aware of a suitable alternative to proposed solution.

📚 Any additional context?

See embedding images in GitHub by anthonywritescode to demonstrate how you can create static image URLs from GitHub by dragging them into an Issue or the Web Editor - which you can then reference from your code - (see screenshots below). The opinion is also provided that you shouldn't store binary files such as images in git, however the reasoning behind that opinion is not covered.

  1. Drag the image to an Issue or the Web Editor within your GitHub project

    Screenshot 2023-12-20 at 15 37 07

  2. GitHub will create and change this to a static URL using the GitHub CDN, which can be referenced in your code or elsewhere

    Screenshot 2023-12-20 at 15 37 45

ruff-vscode is an example where documentation images for the extension are stored through the GitHub CDN and that excludes some of the extended paths from the bundle such as .github/.

mpkorstanje commented 9 months ago

See embedding images in GitHub by anthonywritescode for additional context on using the GitHub CDN over images stored in git.

I'm sorry. Videos are useful for me as explanatory documentation. They're can't be speed read.

kieran-ryan commented 9 months ago

See embedding images in GitHub by anthonywritescode for additional context on using the GitHub CDN over images stored in git.

I'm sorry. Videos are useful for me as explanatory documentation. They're can't be speed read.

That's great feedback - I wouldn't have considered that - noted for future, thank you! Updated description above with detail from video.