Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.59 KB

README.md

File metadata and controls

41 lines (27 loc) · 1.59 KB

Assets Check Bot

This repository hosts a simple github action to analyse your repository for static image files when generating a pull request and then warns when it finds images which are over the file-size threshold.

It currently checks all .jpg, .svg, .png, .gif, .jpeg, .webp, and .riv files.

Install

npm i
# or
yarn install

Build

npm run build

Output Stats

Success

Screenshot 2024-05-23 at 4 28 37 PM

Failure

Screenshot 2024-05-23 at 4 30 21 PM

.assets-ignore file

Sometimes its not possible to optimise an image, or you may not need to because you're utilising Biome's inbuilt aws-image-resizer functionality. In cases like these, we can ignore these files by using a .assets-ignore file inside the root of the repository.

Screenshot 2022-08-24 at 4 49 39 PM

The ignore assets name must be add as full path and separate - separate lines:

Screenshot 2022-08-24 at 4 49 39 PM

Usage:

Check Demo.yml for complete configuration(on using github actions)

License

The scripts and documentation in this project are released under the MIT License