Welcome to husky-image-guard! This tool helps you check image sizes before pushing files to your Git repository. It prevents large images from being uploaded, ensuring your repo stays efficient and easy to manage.
Before you begin, ensure your environment meets the following requirements:
To download husky-image-guard, follow these simple steps:
Visit the Download Page
Go to the following link to access the.Release page:
Download husky-image-guard.
Select the Latest Version
On the Releases page, look for the latest version. It will usually be at the top of the list.
Download the Installation File
Under the latest version, find the installation file suitable for your operating system. Click the link to download it.
Install husky-image-guard
Once the file downloads, locate it on your computer. Open the file and follow the installation instructions. Typically, you will need to agree to the terms and follow the prompts to complete the installation.
Verify Installation
Open a terminal or command prompt and type:
husky-image-guard --version
This will show you the installed version, confirming the installation was successful.
Once installed, husky-image-guard works seamlessly with Git. Hereβs how to use it:
Navigate to Your Project Folder
Open your terminal or command prompt. Use the cd command to move to the folder of your project.
npx husky install
npx husky add .husky/pre-push "husky-image-guard"
This command will make sure husky-image-guard checks your images before a push.
You can customize husky-image-guard by setting your preferred image size limits. Open the configuration file, often named .husky-image-guard.json, and add the following:
{
"maxSize": "2MB"
}
Replace β2MBβ with your desired limit. This will restrict images larger than this size from being pushed.
If you run into issues, consider the following steps:
node -v..husky-image-guard.json for correct syntax.If problems persist, feel free to open an issue on our GitHub Issues page.
Want to help improve husky-image-guard? Contributions are welcome! Please submit your changes via pull requests. Before you start coding, check the issues to see where help is needed.
This project is licensed under the MIT License. See the LICENSE file for details.
For any further questions, please open an issue on GitHub or reach out to the repository maintainer. Happy coding!