Thank you for considering contributing to Blade Flags! This guide will help you get started.
-
Fork and clone the repository:
git clone [email protected]:<your-username>/blade-flags.git cd blade-flags
-
Install dependencies:
composer install pnpm install
-
Build the SVG flag assets:
bash bin/build.sh
This requires jq to be installed.
-
Generate and build the JS packages:
pnpm generate pnpm build
composer testThis project uses Laravel Pint for code style (requires PHP 8.2+). Install it once, then run before committing:
composer require laravel/pint --dev
composer formatCountry flag SVGs come from upstream packages (TwEmoji, circle-flags, flag-icons). Language flags are generated from country flags using the mappings in config/language-countries.json.
To regenerate all flags after changing the config:
bash bin/build.shThe JS packages live in packages/ and are managed as a pnpm workspace. After changing SVGs, regenerate the JS flag modules and rebuild:
pnpm generate # reads resources/svg* → packages/core/src/flags/*.ts
pnpm build # builds all three packages (core, vue, react)- Edit
config/language-countries.jsonwith the new mapping - Run
bash bin/build.shto regenerate the SVGs - Run
pnpm generate && pnpm buildto regenerate the JS flag modules - Run
composer testto verify everything works - Commit both the JSON config and the generated SVGs
- Create a feature branch from
main - Keep changes focused — one feature or fix per PR
- Include tests for new functionality
- Run
composer formatandcomposer testbefore submitting - Run
pnpm generate && pnpm buildif SVGs changed - Describe your changes clearly in the PR description
If you find a bug or have a feature request, please open an issue with as much detail as possible.