Code Monkey home page Code Monkey logo

assets-checker's Introduction

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

assets-checker's People

Contributors

glomotion avatar akshaysharma-bharatpe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.