Contributing to Basekit
This page is for developers who want to contribute to the Basekit package itself.
Prerequisites
You will need the following tools installed locally:
- PHP 8.3+
- Composer
- Node.js & npm
tailwindcssand PostCSS (installed vianpm install)
Setting Up the Package Locally
Clone the repository and install both PHP and Node dependencies:
git clone https://github.com/basekit-laravel/basekit-laravel-ui.git
cd basekit-laravel-ui
composer install
npm installRebuilding the CSS
For package development, this is not automatic.
The package commits preprocessed CSS in resources/css/dist/v1/, and basekit:ui:build reads from that dist directory when assembling the final bundle. If you change source CSS under resources/css/v1/, you should regenerate the dist files before committing.
1. Build source CSS
Preprocesses the source CSS into resources/css/dist/v1/ and writes minified copies:
npm run css:dist2. Bundle for distribution
Builds the final package bundle from the preprocessed dist files:
npm run build:distRun both together:
npm run css:dist && npm run build:distIf you only run npm run build:dist, it does not rebuild resources/css/dist/v1/ first.
Regenerating the Styleguide
The VitePress docs include a pre-rendered styleguide snapshot at docs/public/styleguide.html. After modifying component Blade views, regenerate it directly from the package:
composer styleguideThis runs ./vendor/bin/testbench basekit:ui:styleguide using Orchestra Testbench. The generated file is committed to the repository and served statically by VitePress.
Running Tests
composer testOr with coverage:
composer test:coverageCode Style
The project uses Laravel Pint for PHP code style:
composer lintSubmitting Changes
- Fork the repository and create a feature branch
- Make your changes and add tests where applicable
- Run
npm run css:dist && npm run build:distif you modified any CSS - If you modified component Blade views, regenerate the styleguide snapshot:bash
composer styleguide - Open a pull request against the
mainbranch
Next Steps
- Installation Guide — set up the package in a host app for testing
- Theming Guide — understand the CSS variable system
- Component Reference — browse all available components