americanexpress / jest-image-snapshot

✨ Jest matcher for image comparisons. Most commonly used for visual regression testing.
Apache License 2.0
3.85k stars 200 forks source link

Reduce distribution size #294

Closed neurolabusc closed 2 years ago

neurolabusc commented 2 years ago

Running npm install jest-image-snapshot takes a long time for slow connections and takes up a lot of disk space. The reason is the 2.9mb of files in the images folder that are linked in the README.md github description. Is there any way these penalties could be reduced, e.g. with a demo that only has a few images, links to images at a separate URL (e.g. the images have not been changed in four years). Given the popularity of this tool, it would be considerate if the installation time and size could be optimized.

anescobar1991 commented 2 years ago

You could probably open a pull request to update the URLs in the README to point to the raw image URL (something like https://raw.githubusercontent.com/americanexpress/jest-image-snapshot/main/images/create-snapshot.gif) and also add images to the .npmignore file?

@JAdshead thoughts? The only thing I don't like but don't think is a dealbreaker is the branch name being hardcoded in the URL but these have not changed since I first added them 4 years ago so...

JAdshead commented 2 years ago

I think that would be fine. including them in the .npmignore might be sufficient

oneamexbot commented 2 years ago

:tada: This issue has been resolved in version 5.1.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: